24 Commits

Author SHA1 Message Date
291d911a50 fix: handle ITEM cursor index in restore_cursor and remove duplicate 2026-04-27 07:49:59 -07:00
67c91a37b0 fix: wire item_confirmed signal and set item cursor icon 2026-04-27 07:49:59 -07:00
cec36b7aec fix: set Background to MOUSE_FILTER_PASS so clicks reach panel children 2026-04-27 07:49:59 -07:00
7c36d9ff55 fix: restore show_overlay and hide_overlay bodies (edit merged them) 2026-04-27 07:49:59 -07:00
91f4b1d8d5 debug: add logging to inventory overlay and backpack for click debugging 2026-04-27 07:49:58 -07:00
870e3a6ff7 fix: set Frame mouse_filter to PASS so clicks reach inventory slots 2026-04-27 07:49:58 -07:00
d039c996d1 fix: set ItemBox mouse_filter to PASS so clicks reach InventorySlot 2026-04-27 07:49:58 -07:00
eadbd636ac fix: single-click selects item and closes overlay 2026-04-27 07:49:58 -07:00
d2b1f4ab3d fix: add slot to grid before calling set_item so @onready nodes exist 2026-04-27 07:49:58 -07:00
7601c87600 fix: refresh inventory grid when overlay opens 2026-04-27 07:49:58 -07:00
a54fe6652f feat: add example splash item for inventory testing 2026-04-27 07:49:58 -07:00
cebd53ae8e fix: backpack icon returns to home position when overlay closes 2026-04-27 07:49:58 -07:00
81feaa4f4f fix: connect Background gui_input to close overlay on outside click 2026-04-27 07:49:58 -07:00
efc2b2249c fix: clicking outside inventory panel closes overlay 2026-04-27 07:49:58 -07:00
b3bad1d0e6 fix: correct overlay node path in MainGame signal handlers 2026-04-27 07:49:58 -07:00
a9ec2e6893 fix: wire backpack signals to root Node2D instead of HUD CanvasLayer 2026-04-27 07:49:58 -07:00
378bcdda47 fix: wire backpack signals and simplify positioning
- Connect overlay_show_requested/overlay_hide_requested signals in Game.tscn
  to new handlers in MainGame.gd that call show_overlay()/hide_overlay()
- Simplify backpack to fixed 70x70 position at top-left (layout_mode=0)
- Remove broken anchor overrides from Game.tscn that were anchoring to bottom
2026-04-27 07:49:58 -07:00
d94912bb79 fix: bind callbacks before passing to tween_callback, tighten backpack hitbox
- Godot 4's CallbackTweener doesn't have .bind() — move .bind() call
  inside tween_callback() for 3 callback sites
- Shrink InventoryBackpack Control to 60x60 (offset_right -70) so click
  area matches the visible BackpackIcon square
2026-04-27 07:49:58 -07:00
92866d5fc8 fix: make inventory backpack visible by instancing in Game.tscn and fixing Tween API
- Add InventoryBackpack under HUD CanvasLayer (layer 5) in Game.tscn
- Add InventoryOverlay under InventoryOverlayLayer CanvasLayer (layer 10)
- Fix Tween.TRANS_SINE_IN -> .set_trans(TRANS_SINE).set_ease(EASE_IN) in
  InventoryBackpack.gd (Godot 4.6 split transition and easing APIs)
2026-04-27 07:49:58 -07:00
9ed55d6345 feat: add untracked inventory files from previous session
- ItemDefinition.gd: Resource class with id, name, combination_category
- ItemDefinition.gd.uid: UID cache file
- InventoryManager.gd.uid: UID cache file (script was committed, UID was not)
- inventory-prd.md: Original product requirements document (791 lines)
- docs/plans/2026-04-26-001-feat-inventory-backpack-system-plan.md:
  Implementation plan with 6 units and 5 user-directed edits
2026-04-27 07:49:58 -07:00
c115810425 fix: remove class_name from InventoryManager to avoid autoload name conflict 2026-04-27 07:49:58 -07:00
e905a8adda feat: register InventoryManager as AutoLoad singleton 2026-04-27 07:49:58 -07:00
fb8798a4ae feat: integrate inventory with cursor system, scene input, and GameScript
- ActionState: add ITEM action (value 4) to enum and get_action_name()
- MainGame: right-click cycles through all 5 actions including ITEM;
  skips ITEM if nothing selected; clears selection when cycling away
- Scene: guard _unhandled_input() against active inventory overlay;
  handle ITEM action for world-wide item use; add give_item(),
  remove_item(), strip_items() helper methods
- SetPiece: handle ITEM action by calling scene's _use_item_on_setpiece()
- GameScript: add GiveItem and GiveItemDeferred script step classes
  for item acquisition during cutscenes
2026-04-27 07:47:45 -07:00
afcf92dbfd feat: implement InventoryBackpack FSM and InventoryOverlay
- InventoryBackpack: Control-based FSM with IDLE/OPEN/SELECTED/ACQUIRE/REMOVE
  states, Tween-based animations, guard condition checks, signal connections
  to InventoryManager for item_acquired/item_removed reactions
- InventoryOverlay: Full-screen overlay with fade-in/out, item grid via
  GridContainer, drag-and-drop item selection, combination via drag-to-slot,
  hover labels, right-click inspect
- InventorySlot: Individual slot with colored box placeholder, hover highlight,
  click/right-click/hover signals
2026-04-27 07:47:45 -07:00
13 changed files with 345 additions and 153 deletions

51
.beads/.gitignore vendored Normal file
View File

@@ -0,0 +1,51 @@
# Dolt database (managed by Dolt, not git)
dolt/
dolt-access.lock
# Runtime files
bd.sock
bd.sock.startlock
sync-state.json
last-touched
# Local version tracking (prevents upgrade notification spam after git ops)
.local_version
# Worktree redirect file (contains relative path to main repo's .beads/)
# Must not be committed as paths would be wrong in other clones
redirect
# Sync state (local-only, per-machine)
# These files are machine-specific and should not be shared across clones
.sync.lock
export-state/
# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
ephemeral.sqlite3
ephemeral.sqlite3-journal
ephemeral.sqlite3-wal
ephemeral.sqlite3-shm
# Dolt server management (auto-started by bd)
dolt-server.pid
dolt-server.log
dolt-server.lock
dolt-server.port
dolt-server.activity
dolt-monitor.pid
# Backup data (auto-exported JSONL, local-only)
backup/
# Legacy files (from pre-Dolt versions)
*.db
*.db?*
*.db-journal
*.db-wal
*.db-shm
db.sqlite
bd.db
# NOTE: Do NOT add negation patterns here.
# They would override fork protection in .git/info/exclude.
# Config files (metadata.json, config.yaml) are tracked by git by default
# since no pattern above ignores them.

81
.beads/README.md Normal file
View File

@@ -0,0 +1,81 @@
# Beads - AI-Native Issue Tracking
Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
## What is Beads?
Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
## Quick Start
### Essential Commands
```bash
# Create new issues
bd create "Add user authentication"
# View all issues
bd list
# View issue details
bd show <issue-id>
# Update issue status
bd update <issue-id> --claim
bd update <issue-id> --status done
# Sync with Dolt remote
bd dolt push
```
### Working with Issues
Issues in Beads are:
- **Git-native**: Stored in Dolt database with version control and branching
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
- **Branch-aware**: Issues can follow your branch workflow
- **Always in sync**: Auto-syncs with your commits
## Why Beads?
**AI-Native Design**
- Built specifically for AI-assisted development workflows
- CLI-first interface works seamlessly with AI coding agents
- No context switching to web UIs
🚀 **Developer Focused**
- Issues live in your repo, right next to your code
- Works offline, syncs when you push
- Fast, lightweight, and stays out of your way
🔧 **Git Integration**
- Automatic sync with git commits
- Branch-aware issue tracking
- Dolt-native three-way merge resolution
## Get Started with Beads
Try Beads in your own projects:
```bash
# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
# Initialize in your repo
bd init
# Create your first issue
bd create "Try out Beads"
```
## Learn More
- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
- **Quick Start Guide**: Run `bd quickstart`
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
---
*Beads: Issue tracking that moves at the speed of thought*

54
.beads/config.yaml Normal file
View File

@@ -0,0 +1,54 @@
# Beads Configuration File
# This file configures default behavior for all bd commands in this repository
# All settings can also be set via environment variables (BD_* prefix)
# or overridden with command-line flags
# Issue prefix for this repository (used by bd init)
# If not set, bd init will auto-detect from directory name
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
# issue-prefix: ""
# Use no-db mode: JSONL-only, no Dolt database
# When true, bd will use .beads/issues.jsonl as the source of truth
# no-db: false
# Enable JSON output by default
# json: false
# Feedback title formatting for mutating commands (create/update/close/dep/edit)
# 0 = hide titles, N > 0 = truncate to N characters
# output:
# title-length: 255
# Default actor for audit trails (overridden by BD_ACTOR or --actor)
# actor: ""
# Export events (audit trail) to .beads/events.jsonl on each flush/sync
# When enabled, new events are appended incrementally using a high-water mark.
# Use 'bd export --events' to trigger manually regardless of this setting.
# events-export: false
# Multi-repo configuration (experimental - bd-307)
# Allows hydrating from multiple repositories and routing writes to the correct database
# repos:
# primary: "." # Primary repo (where this database lives)
# additional: # Additional repos to hydrate from (read-only)
# - ~/beads-planning # Personal planning repo
# - ~/work-planning # Work planning repo
# JSONL backup (periodic export for off-machine recovery)
# Auto-enabled when a git remote exists. Override explicitly:
# backup:
# enabled: false # Disable auto-backup entirely
# interval: 15m # Minimum time between auto-exports
# git-push: false # Disable git push (export locally only)
# git-repo: "" # Separate git repo for backups (default: project repo)
# Integration settings (access with 'bd config get/set')
# These are stored in the database, not in this file:
# - jira.url
# - jira.project
# - linear.url
# - linear.api-key
# - github.org
# - github.repo

9
.beads/hooks/post-checkout Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v0.59.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
bd hooks run post-checkout "$@"
_bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v0.59.0 ---

9
.beads/hooks/post-merge Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v0.59.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
bd hooks run post-merge "$@"
_bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v0.59.0 ---

9
.beads/hooks/pre-commit Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v0.59.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
bd hooks run pre-commit "$@"
_bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v0.59.0 ---

9
.beads/hooks/pre-push Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v0.59.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
bd hooks run pre-push "$@"
_bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v0.59.0 ---

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v0.59.0 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
bd hooks run prepare-commit-msg "$@"
_bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v0.59.0 ---

View File

7
.beads/metadata.json Normal file
View File

@@ -0,0 +1,7 @@
{
"database": "dolt",
"backend": "dolt",
"dolt_mode": "server",
"dolt_database": "ai_game_2",
"project_id": "16f0248d-5833-44e9-91cc-42afea26fd77"
}

1
.gitignore vendored
View File

@@ -14,4 +14,3 @@ tmp/**
tools/ora_editor/node_modules/*
node_modules/*
**/*.log
kq4-sierra-decompile/**

View File

@@ -1,151 +0,0 @@
---
name: gitea-tea
description: Use tea CLI to create, manage, and checkout Gitea pull requests. Use this when opening a PR, managing PRs, or checking out PRs on the Gitea remote (gitea.story-basking.ts.net).
---
# Gitea Tea CLI Skill
This skill covers using `tea` (Gitea's official CLI) for pull request workflows in this project.
## When to Use This Skill
Use this skill when you need to:
- Create a PR from a working branch to master on the Gitea remote
- Open, list, or view PRs
- Checkout a PR locally for review or iteration
- Manage PR state (close, reopen, merge)
## Project Setup
The git remote is `origin` pointing to `git@gitea:notid/ai-game-2.git`. The repo slug is `notid/ai-game-2`.
In this project's environment:
- Gitea login is pre-configured for `gitea.story-basking.ts.net`
- Repo slug: `notid/ai-game-2`
- Target branch for PRs: `master`
- The git remote named `origin` points to this instance
## Key Flags
All tea subcommands support these flags for repo and auth context:
- `-r notid/ai-game-2` - Override repo slug (required when auto-discovery fails, e.g. in worktrees)
- `-R origin` - Discover Gitea login from a specific git remote
- `-l <username>` - Use a different Gitea login
In practice, you usually need just `-r notid/ai-game-2` on the subcommand you're running.
## Creating a PR
Use `tea pulls create` to open a PR from the current branch to master:
```bash
tea pulls create -r notid/ai-game-2 -b master -t "Title" -d "Body"
```
Common flags:
- `-t, --title` - PR title
- `-d, --description` - PR body/description (use heredoc or file for long descriptions)
- `-a, --assignees` - Comma-separated usernames to assign
- `-L, --labels` - Comma-separated labels to apply
- `-m, --milestone` - Milestone to assign
**Writing a multiline description:**
```bash
tea pulls create -r notid/ai-game-2 -b master \
-t "feat: add feature" \
-d "$(cat <<'EOF'
## Summary
- Bullet point one
- Bullet point two
EOF
)"
```
Or write the body to a temp file first and reference it.
## Listing PRs
```bash
tea pulls list -r notid/ai-game-2 # List open PRs
tea pulls list -r notid/ai-game-2 --state all # All PRs
tea pulls list -r notid/ai-game-2 --limit 10 -o simple # Limit output, simple format
```
## Opening a PR in Browser
```bash
tea open pr <number> -r notid/ai-game-2
tea open pr create -r notid/ai-game-2 # Open web UI to create a PR
```
## Checking Out a PR Locally
```bash
tea pulls checkout <number> -r notid/ai-game-2
```
This fetches and checks out the PR branch locally.
## Managing PR State
**Close a PR:**
```bash
tea pulls close <number> -r notid/ai-game-2 --confirm
```
**Reopen a closed PR:**
```bash
tea pulls reopen <number> -r notid/ai-game-2 --confirm
```
**Merge a PR:**
```bash
tea pulls merge <number> -r notid/ai-game-2 --confirm
```
**Edit a PR (title, description, etc.):**
```bash
tea pulls edit <number> -r notid/ai-game-2 -t "New title" -d "New body"
```
## Full PR Creation Workflow
1. Commit all changes on your branch:
```bash
git add . && git commit -m "describe the change"
```
2. Push the branch to origin:
```bash
git push origin <branch-name>
```
3. Create the PR with tea:
```bash
tea pulls create -r notid/ai-game-2 -b master \
-t "feat: description of change" \
-d "Detailed PR body here"
```
4. Open the PR in browser to verify:
```bash
tea open pr <number> -r notid/ai-game-2
```
## Worktree Gotcha
When running from a git worktree, tea may fail to auto-discover the repo. Always pass `-r notid/ai-game-2` explicitly in that case:
```bash
tea pulls list -r notid/ai-game-2 # Works in worktrees
tea pulls create -r notid/ai-game-2 ... # Works in worktrees
```
## Tips
- Always use `-r notid/ai-game-2` to specify the repo explicitly, especially in worktrees
- Use `-b master` to set the target branch (default may differ)
- The `--confirm` flag is required for destructive actions (close, merge)
- Use `-o simple`, `-o json`, `-o table`, etc. to control output format
- `tea whoami` verifies your authentication before running PR commands

108
AGENTS.md
View File

@@ -299,10 +299,116 @@ func _on_exit_interacted() -> void:
Do all work in a branch. Squash the branch before merging into master.
<!-- BEGIN BEADS INTEGRATION -->
## Issue Tracking with bd (beads)
**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods.
### Why bd?
- Dependency-aware: Track blockers and relationships between issues
- Git-friendly: Dolt-powered version control with native sync
- Agent-optimized: JSON output, ready work detection, discovered-from links
- Prevents duplicate tracking systems and confusion
### Quick Start
**Check for ready work:**
```bash
bd ready --json
```
**Create new issues:**
```bash
bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json
bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json
```
**Claim and update:**
```bash
bd update <id> --claim --json
bd update bd-42 --priority 1 --json
```
**Complete work:**
```bash
bd close bd-42 --reason "Completed" --json
```
### Issue Types
- `bug` - Something broken
- `feature` - New functionality
- `task` - Work item (tests, docs, refactoring)
- `epic` - Large feature with subtasks
- `chore` - Maintenance (dependencies, tooling)
### Priorities
- `0` - Critical (security, data loss, broken builds)
- `1` - High (major features, important bugs)
- `2` - Medium (default, nice-to-have)
- `3` - Low (polish, optimization)
- `4` - Backlog (future ideas)
### Workflow for AI Agents
1. **Check ready work**: `bd ready` shows unblocked issues
2. **Claim your task atomically**: `bd update <id> --claim`
3. **Work on it**: Implement, test, document
4. **Discover new work?** Create linked issue:
- `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:<parent-id>`
5. **Complete**: `bd close <id> --reason "Done"`
### Auto-Sync
bd automatically syncs via Dolt:
- Each write auto-commits to Dolt history
- Use `bd dolt push`/`bd dolt pull` for remote sync
- No manual export/import needed!
### Important Rules
- ✅ Use bd for ALL task tracking
- ✅ Always use `--json` flag for programmatic use
- ✅ Link discovered work with `discovered-from` dependencies
- ✅ Check `bd ready` before asking "what should I work on?"
- ❌ Do NOT create markdown TODO lists
- ❌ Do NOT use external issue trackers
- ❌ Do NOT duplicate tracking systems
For more details, see README.md and docs/QUICKSTART.md.
## Landing the Plane (Session Completion)
**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
**MANDATORY WORKFLOW:**
1. **File issues for remaining work** - Create issues for anything that needs follow-up
2. **Run quality gates** (if code changed) - Tests, linters, builds
3. **Update issue status** - Close finished work, update in-progress items
4. **PUSH TO REMOTE** - This is MANDATORY:
```bash
git pull --rebase
bd sync
git push
git status # MUST show "up to date with origin"
```
5. **Clean up** - Clear stashes, prune remote branches
6. **Verify** - All changes committed AND pushed
7. **Hand off** - Provide context for next session
**CRITICAL RULES:**
- Work is NOT complete until `git push` succeeds
- NEVER stop before pushing - that leaves work stranded locally
- NEVER say "ready to push when you are" - YOU must push
- If push fails, resolve and retry until it succeeds
<!-- END BEADS INTEGRATION -->