Repository navigation
feat: reorganize scripts into AI-friendly development tools #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2b3a813
c98cd35
d5c6290
7eb2982
29e3830
cd0ff46
54da48a
a1d1bb3
90a9970
564f45a
cd81a2b
949cdc8
cd2fb12
b3de0c2
b0399ed
81c436d
413469e
8e84cd7
dfa81a1
e47177e
51203e0
16868d2
6ee564b
0c49a40
aacac3f
ba8b8a1
3ad3d9d
ad9e42d
fce0249
9f0c23d
f6185e6
442e5fa
fca635c
9f26bb9
44e42b8
ea9c7b4
6bfe6ad
ef723e6
7b07aba
79be20e
de05405
ef456ec
b0a5e83
0427634
e822160
c896863
f846a3a
b54f3c7
5c6629a
36d5e2b
4f82d84
2e89a32
9ee5e3e
29a6f16
b726808
7791242
d3cfbb9
af93f3f
855b236
aedf610
65ec463
0a02c7a
fc6fa33
1c5d4c7
6af32f8
3d724f0
75f6f0a
c163874
7246059
dba7aef
6473789
73aaa98
433e39c
53b75b7
ec994f5
330b8f7
484ec14
e7bfc74
a9a5326
2cc30b8
3d4a54b
627146e
f5db5b6
350a8dc
bbe302b
bb799bc
3a6af7d
8520dae
fa53f56
9ec7339
4eb9139
4c8794e
c11b92b
7ac95c3
78344d6
0742f47
4195018
9eb24e6
0c556cf
ded9622
cdee0c5
b05fc51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| 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' | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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`. | ||||||||||||||||
|
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 | ||||||||||||||||
|
|
@@ -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 | ||||||||||||||||
|
|
@@ -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 | ||||||||||||||||
|
|
@@ -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 | ||||||||||||||||
|
|
||||||||||||||||
|
|
@@ -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 | ||||||||||||||||
|
|
||||||||||||||||
|
|
@@ -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.) | ||||||||||||||||
|
apstndb marked this conversation as resolved.
Resolved
Comment on lines
+168
to
+169
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's critical to only use
Suggested change
Comment on lines
+168
to
+169
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||
| - 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 | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.