Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
2b3a813
feat: reorganize scripts into AI-friendly development tools
apstndb Jun 17, 2025
c98cd35
fix: correct state tracking to use latest review
apstndb Jun 17, 2025
d5c6290
fix: improve error handling for state file operations
apstndb Jun 17, 2025
7eb2982
feat: add thread details and improve error handling
apstndb Jun 17, 2025
29e3830
docs: enhance review response guidelines with commit hash practices
apstndb Jun 17, 2025
cd0ff46
feat: integrate Gemini Code Review workflow into dev tools
apstndb Jun 17, 2025
54da48a
docs: clarify Gemini review timing - only after PR creation
apstndb Jun 17, 2025
a1d1bb3
feat: enhance PR workflow with explicit scenario commands
apstndb Jun 17, 2025
90a9970
feat: add simultaneous review and PR checks waiting capability
apstndb Jun 17, 2025
564f45a
feat: add review request capability to wait-all command
apstndb Jun 17, 2025
cd81a2b
feat: make reviews + checks the default wait behavior
apstndb Jun 17, 2025
949cdc8
refactor: rename cmd/ to dev-tools/ to match Go module path
apstndb Jun 17, 2025
cd2fb12
fix: improve error handling for PR not found scenarios
apstndb Jun 17, 2025
b3de0c2
feat: add Claude Code timeout awareness for long-running waits
apstndb Jun 17, 2025
b0399ed
fix: add 30-second safety margin for Claude Code timeout
apstndb Jun 17, 2025
81c436d
feat: output review details after wait completion to reduce API calls
apstndb Jun 17, 2025
413469e
fix: improve check status display with user-friendly messages
apstndb Jun 17, 2025
8e84cd7
wip: improved check status logic
apstndb Jun 17, 2025
dfa81a1
feat: add immediate merge conflict detection and termination
apstndb Jun 17, 2025
e47177e
fix: prevent usage help display on merge conflict errors
apstndb Jun 17, 2025
51203e0
fix: eliminate duplicate error messages on merge conflicts
apstndb Jun 17, 2025
16868d2
fix: remove redundant error message in main function
apstndb Jun 17, 2025
6ee564b
docs: consolidate non-obvious insights across appropriate locations
apstndb Jun 17, 2025
0c49a40
test: add timestamp to trigger CI for timeout testing
apstndb Jun 17, 2025
aacac3f
merge: resolve conflicts with origin/main
apstndb Jun 17, 2025
ba8b8a1
feat: add time.Duration support for flexible timeout specification
apstndb Jun 17, 2025
3ad3d9d
feat: implement Claude Code timeout environment detection and safety …
apstndb Jun 17, 2025
ad9e42d
fix: add reminder to read review feedback carefully
apstndb Jun 17, 2025
fce0249
fix: implement waitForReviewsOnly and remove hardcoded username
apstndb Jun 17, 2025
9f0c23d
refactor: extract shared package to reduce code duplication
apstndb Jun 17, 2025
f6185e6
refactor: unify dev-tools under single module structure
apstndb Jun 17, 2025
442e5fa
fix: improve error handling and user guidance for common mistakes
apstndb Jun 17, 2025
fca635c
feat: implement smart issue/PR number resolution system
apstndb Jun 17, 2025
9f26bb9
feat: add explicit format support for issue/PR resolution
apstndb Jun 17, 2025
44e42b8
refactor: use strings.Cut for safer string parsing
apstndb Jun 17, 2025
ea9c7b4
refactor: simplify path parsing with single strings.Cut call
apstndb Jun 17, 2025
6bfe6ad
refactor: standardize operational command error handling
apstndb Jun 17, 2025
ef723e6
refactor: migrate all GraphQL queries from fmt.Sprintf to parameteriz…
apstndb Jun 17, 2025
7b07aba
feat: add comprehensive test and lint targets for dev-tools
apstndb Jun 17, 2025
79be20e
docs: add descriptive comments for *-all Makefile targets
apstndb Jun 17, 2025
de05405
feat: replace gh command GraphQL calls with HTTP client and token cac…
apstndb Jun 18, 2025
ef456ec
feat: replace remaining gh commands with REST API calls
apstndb Jun 18, 2025
b0a5e83
feat: optimize GraphQL client with HTTP/2, query consolidation, and s…
apstndb Jun 18, 2025
0427634
fix: revert CreatePRComment to 2-step approach due to GraphQL limitat…
apstndb Jun 18, 2025
e822160
fix: prevent panic and add auto-detection for gh-helper reviews wait
apstndb Jun 18, 2025
c896863
fix: address Gemini review feedback and prevent missing reviews
apstndb Jun 18, 2025
f846a3a
docs: add retrospective on missing critical review feedback
apstndb Jun 18, 2025
b54f3c7
refactor: reorganize commands and implement unified review system
apstndb Jun 18, 2025
5c6629a
fix: resolve GraphQL directive conflicts in unified review system
apstndb Jun 18, 2025
36d5e2b
docs: fix threads list references and improve JSON documentation
apstndb Jun 18, 2025
4f82d84
feat: implement universal number resolution pattern across all commands
apstndb Jun 18, 2025
2e89a32
fix: improve timeout handling and eliminate DRY violations
apstndb Jun 18, 2025
9ee5e3e
feat: implement persistent flags and add comprehensive tests
apstndb Jun 18, 2025
29a6f16
refactor: consolidate workflows and implement DRY for GraphQL queries
apstndb Jun 18, 2025
b726808
feat: implement comprehensive DRY improvements for dev-tools
apstndb Jun 18, 2025
7791242
feat: complete advanced DRY system with typed infrastructure
apstndb Jun 18, 2025
d3cfbb9
feat: enhance thread reply system with standardized commit references
apstndb Jun 18, 2025
af93f3f
docs: complete gh-helper command documentation
apstndb Jun 18, 2025
855b236
docs: simplify shell completion documentation
apstndb Jun 18, 2025
aedf610
refactor: standardize PR number argument documentation
apstndb Jun 18, 2025
65ec463
docs: update README for PR argument standardization
apstndb Jun 18, 2025
0a02c7a
fix: resolve duplicate Gemini review requests and GraphQL errors
apstndb Jun 18, 2025
fc6fa33
feat: implement unified GraphQL architecture with directive-based fil…
apstndb Jun 18, 2025
1c5d4c7
refactor: simplify timeout handling to use Go's time.Duration directly
apstndb Jun 18, 2025
6af32f8
refactor: replace switch statements with map lookups for cleaner code
apstndb Jun 18, 2025
3d724f0
refactor: unify StatusState/CheckStatusState enum handling
apstndb Jun 18, 2025
75f6f0a
refactor: create unified status formatting for all GitHub enum types
apstndb Jun 18, 2025
c163874
refactor: simplify status handling and remove redundant conditions
apstndb Jun 18, 2025
7246059
feat: add comprehensive GraphQL type definitions
apstndb Jun 18, 2025
dba7aef
refactor: unify BASH_*_TIMEOUT_MS parsing logic
apstndb Jun 18, 2025
6473789
refactor: simplify I/O operations and timeout env parsing
apstndb Jun 18, 2025
73aaa98
feat: add thread resolution and improve reply detection
apstndb Jun 18, 2025
433e39c
docs: document thread resolution workflow and critical fixes
apstndb Jun 18, 2025
53b75b7
feat: add --resolve flag to threads reply for atomic operations
apstndb Jun 18, 2025
ec994f5
fix: restore coverage output and separate CI vs dev testing
apstndb Jun 18, 2025
330b8f7
fix: add client validation to prevent empty owner/repo API errors
apstndb Jun 18, 2025
484ec14
docs: correct 88% metric to clarify code reduction, not API calls
apstndb Jun 18, 2025
e7bfc74
docs: accurately describe 88% as gh CLI invocation reduction
apstndb Jun 18, 2025
a9a5326
feat: implement YAML output for AI tool integration
apstndb Jun 18, 2025
2cc30b8
docs: update README for YAML output and gojq usage
apstndb Jun 18, 2025
3d4a54b
feat: clean structured output with slog for AI processing
apstndb Jun 18, 2025
627146e
refactor: implement Format methods and unify marshal/unmarshal operat…
apstndb Jun 19, 2025
f5db5b6
docs: document unified output format system implementation
apstndb Jun 19, 2025
350a8dc
fix: simplify thread reply logic to focus on resolved status
apstndb Jun 19, 2025
bbe302b
feat: implement multiple thread ID support for resolve command
apstndb Jun 19, 2025
bb799bc
feat: add multiple thread ID support to threads show command
apstndb Jun 19, 2025
3a6af7d
docs: update CLAUDE.md with new dev-tools structure
apstndb Jun 19, 2025
8520dae
docs: add gh-dev-tools development guidelines to CLAUDE.md
apstndb Jun 19, 2025
fa53f56
docs: remove gh-dev-tools section from CLAUDE.md
apstndb Jun 19, 2025
9ec7339
feat: eliminate spanner-mycli-dev, replace with simple Makefile targets
apstndb Jun 19, 2025
4eb9139
fix: output coverage.out to tmp/ directory to prevent accidental commits
apstndb Jun 19, 2025
4c8794e
fix: update CI workflow to use test-coverage instead of removed check…
apstndb Jun 19, 2025
c11b92b
feat: migrate to Go 1.24 tool management for gh-helper
apstndb Jun 19, 2025
7ac95c3
docs: refactor development-tools-guide to focus on current usage
apstndb Jun 19, 2025
78344d6
docs: clarify Gemini review workflow with --request-review flag
apstndb Jun 19, 2025
0742f47
refactor: complete cleanup of dev-tools references and file reorganiz…
apstndb Jun 19, 2025
4195018
docs: update dev-docs/README.md to reflect file reorganization
apstndb Jun 19, 2025
9eb24e6
refactor: complete transition to pure go tool approach
apstndb Jun 19, 2025
0c556cf
docs: strengthen git add best practices in CLAUDE.md
apstndb Jun 19, 2025
ded9622
docs: fix numbering and formatting consistency from review feedback
apstndb Jun 19, 2025
cdee0c5
fix: add timeout to gh-review target in Makefile
apstndb Jun 19, 2025
b05fc51
docs: establish comprehensive review response workflow
apstndb Jun 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/golangci-lint.yml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
with:
go-version: '1.24'
- run: go version
- name: do go test
run: go test ./... -coverprofile=coverage.out
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.1
args: --timeout=5m
- name: run tests with coverage
run: make test-coverage
- uses: k1LoW/octocov-action@v1
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ credentials.json
# IDE and tool directories - DO NOT delete in main workspace, safe to delete ONLY in phantom worktrees
.idea # JetBrains IDE settings
.claude # Claude Code session data
!.claude/settings.json # Exception: project-wide Claude Code settings (team shared)
Comment thread
apstndb marked this conversation as resolved.
Resolved
Comment thread
apstndb marked this conversation as resolved.
Resolved

# Cache and temporary files - safe to delete anywhere
.cache/ # Application cache directory
tmp/ # Development temporary files
tmp/ # Development temporary files (e.g., help output generation)

# Configuration files with secrets - may contain sensitive connection info, check before deleting
.*.cnf


# Phantom worktree notes - temporary development notes, safe to delete anywhere
.notes.md
2 changes: 2 additions & 0 deletions .octocov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# generated by octocov init
coverage:
if: true
paths:
- tmp/coverage.out
codeToTestRatio:
code:
- '**/*.go'
Expand Down
75 changes: 42 additions & 33 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
**Why this rule is critical**: CLAUDE.md is read by AI assistants for every development task. Including verbose content creates cognitive overload and buries essential requirements like `make test && make lint`.
Comment thread
apstndb marked this conversation as resolved.
Resolved

### What belongs in CLAUDE.md
- Critical requirements (e.g., `make test && make lint` before push)
- Critical requirements (e.g., `make check` before push)
- Essential commands for daily development
- Brief architecture overview with links to details
- Documentation structure navigation
Expand All @@ -30,33 +30,37 @@ spanner-mycli is a personal fork of spanner-cli, designed as an interactive comm
## 🚨 CRITICAL REQUIREMENTS

**Before ANY push to the repository**:
1. **Always run `make test`** (not `make fasttest`) - all integration tests must pass
2. **Always run `make lint`** - code quality and style compliance required
3. **Resolve conflicts with origin/main** - ensure branch can merge cleanly to avoid integration issues
4. **Never push directly to main branch** - always use Pull Requests
5. **Never commit directly to main branch** - always use feature branches
1. **Always run `make check`** - runs test && lint (required for quality assurance)
2. **Resolve conflicts with origin/main** - ensure branch can merge cleanly to avoid integration issues
3. **Never push directly to main branch** - always use Pull Requests
4. **Never commit directly to main branch** - always use feature branches

## Essential Commands

```bash
# Development cycle
# Development cycle (CRITICAL)
make check # REQUIRED before ANY push (runs test && lint)
make build # Build the application
make test && make lint # Required before push
make fasttest # Quick tests during development

# Running the application
make run PROJECT=myproject INSTANCE=myinstance DATABASE=mydatabase
go run . -p PROJECT -i INSTANCE -d DATABASE

# Documentation updates
scripts/docs/update-help-output.sh # Update README.md help sections

# Phantom worktree management (recommended)
scripts/dev/setup-phantom-worktree.sh issue-276-timeout-flag

# GitHub review replies (automated)
scripts/dev/list-review-threads.sh 287 # Find threads needing replies
scripts/dev/review-reply.sh THREAD_ID "reply" # Reply to specific thread
make test-quick # Quick tests during development

# Development tools (Go 1.24 tool management: make build-tools)
go tool gh-helper reviews analyze [PR] # Comprehensive review analysis (prevents missing feedback)
go tool gh-helper reviews wait [PR] # Wait for reviews + checks
go tool gh-helper reviews wait [PR] --request-review # Request Gemini review + wait

# Workflow examples
gh pr create # Create PR (interactive for title/body)
go tool gh-helper reviews wait # Wait for automatic Gemini review (initial PR only)

# Review response workflow (for subsequent pushes)
go tool gh-helper reviews analyze <PR> > tmp/review-analysis.yaml # Analyze all feedback
# Create fix plan in tmp/fix-plan.md, make changes, commit & push
go tool gh-helper reviews wait <PR> --request-review # Request Gemini review
# Reply to threads with commit hash and --resolve flag

# Output format examples (YAML default, JSON with --json)
go tool gh-helper reviews analyze 306 | gojq --yaml-input '.summary.critical'
go tool gh-helper reviews fetch 306 --json | jq '.reviewThreads.needingReply[]'
```

## Core Architecture Overview
Expand All @@ -80,7 +84,7 @@ For detailed implementation patterns, see [dev-docs/patterns/system-variables.md
### Phantom Worktree Usage
```bash
# Automated setup (recommended)
scripts/dev/setup-phantom-worktree.sh issue-123-feature # Auto-fetches and bases on origin/main
make worktree-setup WORKTREE_NAME=issue-123-feature # Auto-fetches and bases on origin/main

# Work in isolated environment
phantom shell issue-123-feature --tmux-horizontal
Expand Down Expand Up @@ -112,9 +116,8 @@ This is a simplified guide. For detailed information, refer to:
- **[query_plan.md](docs/query_plan.md)** - Query plan analysis features
- **[system_variables.md](docs/system_variables.md)** - System variables reference

### Automation Scripts (`scripts/`)
- **[docs/update-help-output.sh](scripts/docs/update-help-output.sh)** - Update README help sections
- **[dev/setup-phantom-worktree.sh](scripts/dev/setup-phantom-worktree.sh)** - Automated worktree setup
### Development Tools **Go 1.24 Tool Management: `make build-tools`**
- **gh-helper** - Generic GitHub operations (managed via go.mod tool directive)

## 🎯 Task-Specific Documentation Guide

Expand All @@ -127,20 +130,24 @@ This is a simplified guide. For detailed information, refer to:
1. **ALWAYS check**: [dev-docs/issue-management.md](dev-docs/issue-management.md) - Complete GitHub workflow
2. **For PR labels**: [dev-docs/issue-management.md#pull-request-labels](dev-docs/issue-management.md#pull-request-labels) - Release notes categorization
3. **For insights capture**: [dev-docs/issue-management.md#knowledge-management](dev-docs/issue-management.md#knowledge-management) - PR comment best practices
4. **For review replies**: Use `scripts/dev/list-review-threads.sh` and `scripts/dev/review-reply.sh` - Automated thread replies
5. **GitHub GraphQL API**: [docs.github.com/en/graphql](https://docs.github.com/en/graphql) - Official API documentation
4. **For review analysis**: Use `go tool gh-helper reviews analyze` for comprehensive feedback analysis (prevents missing critical issues)
5. **For thread replies**: Use `go tool gh-helper threads reply` - Automated thread replies
6. **GitHub GraphQL API**: [docs.github.com/en/graphql](https://docs.github.com/en/graphql) - Official API documentation

**⚠️ CRITICAL: Use `go tool gh-helper reviews analyze` for comprehensive feedback analysis (review bodies + threads)**
**⚠️ WORKFLOW: Plan fixes β†’ commit & push β†’ reply with commit hash and resolve threads immediately**

### When encountering development problems:
1. **ALWAYS check**: [dev-docs/development-insights.md](dev-docs/development-insights.md) - Known patterns and solutions
2. **For error handling**: [dev-docs/development-insights.md#error-handling-architecture-evolution](dev-docs/development-insights.md#error-handling-architecture-evolution)
3. **For resource management**: [dev-docs/development-insights.md#resource-management-in-batch-processing](dev-docs/development-insights.md#resource-management-in-batch-processing)

### When setting up development environment:
1. **Start here**: Use `scripts/dev/setup-phantom-worktree.sh` for worktree setup
1. **Start here**: Use `make worktree-setup WORKTREE_NAME=issue-123-feature` for worktree setup
2. **For workflow details**: [dev-docs/development-insights.md#parallel-issue-development-with-phantom](dev-docs/development-insights.md#parallel-issue-development-with-phantom)

### When updating documentation:
1. **README.md help updates**: Use `scripts/docs/update-help-output.sh`
1. **README.md help updates**: Use `make docs-update`
2. **CLAUDE.md updates**: Follow the rules in this file (self-contained)
3. **Other docs**: See [dev-docs/README.md](dev-docs/README.md) for structure guidance

Expand All @@ -158,9 +165,11 @@ make lint # Code quality checks (required before push)
```

### Git Practices
- Always use `git add <specific-files>` (never `git add .`)
- **CRITICAL**: Always use `git add <specific-files>` (never `git add .` or `git add -A`)
- **Reason**: Prevents accidental commits of untracked files (.claude, .idea/, tmp/, etc.)
Comment thread
apstndb marked this conversation as resolved.
Resolved
Comment on lines +168 to +169

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

It's critical to only use git add <specific-files> to prevent accidental commits of untracked files. The reason for this is well documented on line 169 and is important to follow.

Suggested change
- **CRITICAL**: Always use `git add <specific-files>` (never `git add .` or `git add -A`)
- **Reason**: Prevents accidental commits of untracked files (.claude, .idea/, tmp/, etc.)
git add <specific-files>

Comment on lines +168 to +169

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

  • CRITICAL: Always use git add <specific-files> (never git add . or git add -A)
  • Reason: Prevents accidental commits of untracked files (.claude, .idea/, tmp/, etc.)
Suggested change
- **CRITICAL**: Always use `git add <specific-files>` (never `git add .` or `git add -A`)
- **Reason**: Prevents accidental commits of untracked files (.claude, .idea/, tmp/, etc.)
- **CRITICAL**: Always use `git add <specific-files>` (never `git add .` or `git add -A`)
- **Reason**: Prevents accidental commits of untracked files (.claude, .idea/, tmp/, etc.). Always check `git status` before committing to verify only intended files are staged.

- Link PRs to issues: "Fixes #issue-number"
- Check `git status` before committing
- Check `git status` before committing to verify only intended files are staged


## Important Notes

Expand Down
99 changes: 95 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
build:
go build

build-tools:
# Install development tools using Go 1.24 tool management
# gh-helper: Generic GitHub operations (reviews, threads) - managed via go.mod tool directive
@echo "πŸ“¦ Installing tools from go.mod tool directive..."
go install tool
Comment thread
apstndb marked this conversation as resolved.
Resolved
@echo "βœ… Tools installed successfully"
@echo "πŸ’‘ Use: go tool gh-helper --help"

clean:
rm -f spanner-mycli
rm -rf dist/
Expand All @@ -15,11 +23,94 @@ test:
test-verbose:
go test -v ./...

fasttest:
go test -short ./...
# Test with coverage profile (for CI)
test-coverage:
@mkdir -p tmp
go test ./... -coverprofile=tmp/coverage.out

fasttest-verbose:
go test -short -v ./...

lint:
golangci-lint run


# Enhanced development targets (issue #301 - script reorganization)
# Development targets using Go 1.24 tool management and simple Makefile workflows
.PHONY: test-quick check docs-update help-dev worktree-setup worktree-list worktree-delete gh-review build-tools

# Quick tests for development cycle
test-quick:
go test -short ./...

# Combined test and lint check (required before push)
check: test lint
Comment thread
apstndb marked this conversation as resolved.
Resolved


# Update README.md help sections (replacing spanner-mycli-dev)
docs-update:
@echo "πŸ“ Updating help output for README.md..."
@mkdir -p tmp
@script -q tmp/help_output.txt sh -c "stty cols 200; go run . --help"
@go run . --statement-help > tmp/statement_help.txt
@sed '1s/^...//' tmp/help_output.txt > tmp/help_clean.txt
Comment thread
apstndb marked this conversation as resolved.
Resolved
@echo "βœ… Help output files generated successfully in ./tmp/"
@echo "πŸ“‹ Generated files:"
@echo " - help_clean.txt: --help output for README.md"
@echo " - statement_help.txt: --statement-help output for README.md"

# Show development help
help-dev:
@echo "πŸ› οΈ Development Commands:"
@echo " make build - Build the application"
@echo " make build-tools - Install gh-helper using Go 1.24 tool management"
@echo " make test - Run full test suite (required before push)"
@echo " make test-coverage - Run tests with coverage profile (for CI)"
@echo " make test-quick - Run quick tests (go test -short)"
@echo " make lint - Run linter (required before push)"
@echo " make check - Run test && lint (required before push)"
@echo " make clean - Clean build artifacts and test cache"
@echo " make run - Run with PROJECT/INSTANCE/DATABASE env vars"
@echo " make docs-update - Generate help output for README.md"
@echo " make worktree-setup - Setup phantom worktree (requires WORKTREE_NAME)"
@echo " make worktree-list - List existing phantom worktrees"
@echo " make worktree-delete - Delete phantom worktree (requires WORKTREE_NAME)"
@echo ""
@echo "πŸ”§ Development Tools:"
@echo " go tool gh-helper - GitHub operations (managed via go.mod tool directive)"
@echo ""
@echo "πŸš€ Quick Start for AI Assistants:"
@echo " gh pr create && go tool gh-helper reviews wait # Create PR + wait for review"
@echo " go tool gh-helper reviews wait <PR> --request-review # Request Gemini review + wait"

# Phantom worktree management (replacing spanner-mycli-dev)
worktree-setup:
@if [ -z "$(WORKTREE_NAME)" ]; then \
echo "❌ WORKTREE_NAME required. Usage: make worktree-setup WORKTREE_NAME=issue-123-feature"; \
exit 1; \
fi
@echo "πŸ”§ Creating phantom worktree: $(WORKTREE_NAME)"
@git fetch origin
@phantom create $(WORKTREE_NAME) --base origin/main --exec "ln -sf ../../../../.claude .claude"
@echo "βœ… Worktree created successfully!"
@echo "πŸ“‹ Next: phantom shell $(WORKTREE_NAME) --tmux-horizontal"

worktree-list:
@phantom list

worktree-delete:
@if [ -z "$(WORKTREE_NAME)" ]; then \
echo "❌ WORKTREE_NAME required. Usage: make worktree-delete WORKTREE_NAME=issue-123-feature"; \
exit 1; \
fi
@echo "πŸ” Checking status of worktree: $(WORKTREE_NAME)"
@phantom exec $(WORKTREE_NAME) git status --porcelain
@echo "πŸ—‘οΈ Deleting worktree: $(WORKTREE_NAME)"
@phantom delete $(WORKTREE_NAME)
Comment thread
apstndb marked this conversation as resolved.
Resolved
@echo "βœ… Worktree deleted successfully"

# GitHub review monitoring (requires PR_NUMBER)
gh-review:
@if [ -z "$(PR_NUMBER)" ]; then \
echo "❌ PR_NUMBER required. Usage: make gh-review PR_NUMBER=123"; \
exit 1; \
fi
@go tool gh-helper reviews analyze $(PR_NUMBER) --timeout 15m
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ https://github.com/apstndb/spanner-mycli/pkgs/container/spanner-mycli

## Usage

<!-- Content from ./tmp/help_clean.txt. Generated by: scripts/docs/update-help-output.sh -->
<!-- Content from ./tmp/help_clean.txt. Generated by: make docs-update -->
```
Usage:
spanner-mycli [OPTIONS]
Expand Down Expand Up @@ -382,7 +382,7 @@ and `{A|B|...}` for a mutually exclusive keyword.

* The syntax is case-insensitive.

<!-- Generated with: scripts/docs/update-help-output.sh -->
<!-- Generated with: make docs-update -->
| Usage | Syntax | Note |
|:----------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Switch database | `USE <database> [ROLE <role>];` | The role you set is used for accessing with [fine-grained access control](https://cloud.google.com/spanner/docs/fgac-about). |
Expand Down
15 changes: 6 additions & 9 deletions dev-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,17 @@ dev-docs/
- Context and session management

### [Issue Management](issue-management.md)
- GitHub issue workflow
- Pull request process
- Code review strategies
- Git best practices
- Development tools usage (Go 1.24 tool management)
- GitHub issue workflow and labeling
- Pull request process and code review
- Gemini AI review integration
- Git best practices and phantom worktree management
- Knowledge management through PR comments

<<<<<<< HEAD
=======
### [Coding Guidelines](coding-guidelines.md)
- Go language standards and conventions
- Project-specific coding rules
- Current deviations and future improvements

>>>>>>> origin/main
### [Patterns](patterns/)
- [System Variables](patterns/system-variables.md) - Implementation patterns for system variables, timeout management, and testing strategies

Expand All @@ -71,7 +68,7 @@ dev-docs/

```bash
# Generate help output files
scripts/docs/update-help-output.sh
make docs-update

# Files are generated in ./tmp/
# - help_clean.txt: Content for README.md --help section (lines 97-135)
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/architecture-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ spanner-mycli/
β”œβ”€β”€ testdata/ # Test fixtures
β”œβ”€β”€ docs/ # User documentation
β”œβ”€β”€ dev-docs/ # Developer documentation
β”œβ”€β”€ scripts/ # Automation scripts
β”œβ”€β”€ bin/ # Development tool symlinks (created by make build-tools)
└── official_docs/ # Upstream documentation
```

Expand Down
Loading