Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged

next #118

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
92f0910
next
towry Jun 29, 2025
f0a2d18
feat: add yank-file script for clipboard operations
towry Jun 29, 2025
2d49cef
ai goose config
towry Jun 29, 2025
8968405
feat(goose): add elixir issue solver recipe and tools
towry Jun 30, 2025
6635ffd
docs: add model identification rule to coding rules
towry Jul 1, 2025
96a3eb8
feat(jj): add -m flag for extra context to ai-ci
towry Jul 1, 2025
49c4d32
docs: update git-commit role configuration
towry Jul 1, 2025
ce3b42d
docs: update LLM configuration parameters
towry Jul 1, 2025
49e2ee1
chore: adjust LLM temperature and top_p parameters
towry Jul 1, 2025
f309480
docs: remove outdated model identification rule
towry Jul 1, 2025
97a2725
chore: update model configuration in git-commit.md
towry Jul 1, 2025
87a579a
chore: add rsync to shared Nix configuration
towry Jul 2, 2025
f52d872
feat(nix): add merge command to jj.nix
towry Jul 2, 2025
731b4ad
feat(config): update GOOSE_MODEL to qwen/qwen3-235b-a22b
towry Jul 3, 2025
f363934
feat(config): add mastergo configuration to goose
towry Jul 3, 2025
48b9af8
feat(nix): update Nix configurations for improved performance
towry Jul 3, 2025
b0f8c8d
feat(docs): add error message for bookmark syntax issue
towry Jul 4, 2025
9399b0d
feat: add windsurf alias and jj config updates
towry Jul 4, 2025
d5d4c95
chore: update AI model for prompt generation
towry Jul 4, 2025
de3beed
fix: improve jj-fork description extraction and AI branch naming
towry Jul 5, 2025
b83a838
docs: update coding rules for LLM
towry Jul 5, 2025
d4750a6
refactor: remove unused LLM configurations
towry Jul 5, 2025
982596e
chore: add prompt for code review
towry Jul 6, 2025
6cec600
[skip ci] feat: add `ds-skip-ci` command to jj config
towry Jul 6, 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
13 changes: 13 additions & 0 deletions ai-br-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
```
Creating bookmark pointing to lqr: towry/chore-add-lint-script towry/refactor-remove-unused-import-secondary-nav-070409
error: invalid value 'towry/chore-add-lint-script towry/refactor-remove-unused-import-secondary-nav-070409' for '<NAMES>...': Failed to parse bookmark name: Syntax error

For more information, try '--help'.
Caused by: --> 1:28
|
1 | towry/chore-add-lint-script towry/refactor-remove-unused-import-secondary-nav-070409
| ^---
|
= expected <EOI>
Hint: See https://jj-vcs.github.io/jj/latest/revsets/ or use `jj help -k revsets` for how to quote symbols.
```
26 changes: 26 additions & 0 deletions conf/bash/scripts/goose-role
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

# This script runs a goose recipe after verifying the file exists
# Usage: goose-role.sh <recipe-file-path>

set -euo pipefail

if [ $# -ne 1 ]; then
echo "Error: Recipe file path is required"
echo "Usage: $(basename "$0") <recipe-file-path>"
exit 1
fi

recipe_file="$1"

# prepend with $HOME/workspace/goose-recipes_
recipe_file="$HOME/workspace/goose-recipes_/$recipe_file"

# Verify file exists
if [ ! -f "$recipe_file" ]; then
echo "Error: Recipe file '$recipe_file' does not exist"
exit 1
fi

# Run goose with the recipe
exec goose run --interactive --recipe "$recipe_file"
64 changes: 64 additions & 0 deletions conf/bash/scripts/yank-file
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/usr/bin/env bash

# yank-file - Copy file content to clipboard
# Usage: yank-file <file_path>

set -euo pipefail

# Function to display usage
usage() {
echo "Usage: yank-file <file_path>"
echo "Copy the content of a file to the clipboard"
exit 1
}

# Function to detect clipboard command
detect_clipboard_cmd() {
if command -v pbcopy >/dev/null 2>&1; then
echo "pbcopy"
elif command -v xclip >/dev/null 2>&1; then
echo "xclip -selection clipboard"
elif command -v xsel >/dev/null 2>&1; then
echo "xsel --clipboard --input"
elif command -v wl-copy >/dev/null 2>&1; then
echo "wl-copy"
else
echo ""
fi
}

# Check if file path is provided
if [ $# -eq 0 ]; then
echo "Error: No file path provided" >&2
usage
fi

file_path="$1"

# Check if file exists
if [ ! -f "$file_path" ]; then
echo "Error: File '$file_path' does not exist or is not a regular file" >&2
exit 1
fi

# Check if file is readable
if [ ! -r "$file_path" ]; then
echo "Error: File '$file_path' is not readable" >&2
exit 1
fi

# Detect clipboard command
clipboard_cmd=$(detect_clipboard_cmd)

if [ -z "$clipboard_cmd" ]; then
echo "Error: No clipboard utility found. Please install one of: pbcopy, xclip, xsel, or wl-copy" >&2
exit 1
fi

# Copy file content to clipboard
if eval "cat '$file_path' | $clipboard_cmd"; then
echo "✓ Content of '$file_path' copied to clipboard"
else
echo "Error: Failed to copy file content to clipboard" >&2
exit 1
fi
2 changes: 1 addition & 1 deletion conf/fish/funcs/jj-fork.fish
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function jj-fork --description "Fork from a bookmark or revision"
# If revision is provided, try to get commit message as description
if set -q _flag_revision
echo "No description provided, getting commit message from revision $_flag_revision..."
set -l commit_message (jj --ignore-working-copy log --quiet -r $_flag_revision -T 'description' 2>/dev/null)
set -l commit_message (jj --ignore-working-copy log --no-graph --quiet -r $_flag_revision -T 'description.first_line()' 2>/dev/null)
if test $status -eq 0 -a -n "$commit_message"
set _flag_description $commit_message
echo "Using commit message as description: $commit_message"
Expand Down
4 changes: 4 additions & 0 deletions conf/fish/shellcompl/goose-role.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Fish completion for goose-role
# Provides completion with files from goose-recipes directory

complete -c goose-role -f -a '(fd -t f -t l -e yaml -e yml --base-directory $HOME/workspace/goose-recipes_)' -d "Recipe file"
18 changes: 14 additions & 4 deletions conf/llm/aichat/roles/gen-prompt.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
model: openrouter:anthropic/claude-3.7-sonnet:floor
temperature: 0.1
model: openrouter:anthropic/claude-sonnet-4
temperature: 0.2
top_p: 0.2
---

Expand Down Expand Up @@ -45,6 +45,15 @@ Transform user requirements into structured prompts that guide LLM agents to cre
- Presentation: UI logic, user interaction
- No mixed concerns (e.g., data access + caching)

**Module Impact Analysis**
- When adding/modifying methods in a module, review the entire module for:
- Other methods that may need updates or become inconsistent
- Existing patterns that should be followed or updated
- Dependencies that may be affected by the change
- Interface contracts that may need adjustment
- Consider ripple effects: what other parts of the codebase depend on this module?
- Ensure changes maintain module cohesion and don't break existing functionality

**API Design**
- Clear function signatures with minimal parameters
- No passing entire objects when specific values needed
Expand Down Expand Up @@ -134,6 +143,8 @@ Please write an agent task plan in markdown file suffix with `-task-plan.md` in

### Project Structure Analysis Tools

Use modern tool `fd`, `ripgrep` instead of slow `find` and `grep`.

**Directory Context** (MANDATORY FIRST)
- `pwd` - current directory
- `fd -t f -d 3 "mix.exs|package.json|pyproject.toml|Cargo.toml" .` - find project markers
Expand All @@ -150,8 +161,7 @@ Please write an agent task plan in markdown file suffix with `-task-plan.md` in
- `rg "cache|log|metric|http|db"` - cross-cutting concerns

**Documentation Access**
- `mcp_context7_resolve-library-id` - find library IDs
- `mcp_context7_get-library-docs` - retrieve documentation
- use `context7` mcp tool to search for documentation
- Web search for best practices
- GitHub search for examples

Expand Down
15 changes: 5 additions & 10 deletions conf/llm/aichat/roles/git-branch.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
model: openrouter:google/gemini-2.5-flash-preview-05-20
temperature: 0
top_p: 0.1
model: openrouter:mistralai/devstral-small
temperature: 0.3
top_p: 0.4
---

你是一个 Git 分支命名专家。你的任务是根据提供的 commit message,生成一个规范的 git branch 名称。
Expand All @@ -24,11 +24,6 @@ top_p: 0.1
- `perf-`: 性能优化
- `test-`: 测试
8. 分支名称长度不应过长,减少不必要的动词来控制长度
9. 重要: 只返回一个分支名称,不要包含任何解释或其他文本以及换行符号

一个完整的分支名称示例:

```
towry/feat-add-dark-mode-support
```

只返回生成的分支名称,不要包含任何解释或其他文本以及换行符号。
一个完整的分支名称示例:towry/feat-add-dark-mode-support
6 changes: 3 additions & 3 deletions conf/llm/aichat/roles/git-commit.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
model: openrouter:google/gemini-2.5-flash-preview-05-20
temperature: 0
top_p: 0.3
model: openrouter:google/gemini-2.5-flash
temperature: 0.2
top_p: 0.2
---

You are a Git commit message expert and code reviewer. Generate conventional commit messages with optional review feedback based on git diff and context.
Expand Down
18 changes: 16 additions & 2 deletions conf/llm/docs/coding-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,35 @@
## CRITICAL RULES (Always Apply)

### Response Behavior

- **Answer questions directly**: For instructional queries ("how to...", "what is...", "explain..."), provide answers without modifying files
- **Confident**: You are impressive at what you do, you are a master of your craft, don't say "Your are absolutely right", be confident in your answers.

### Code Safety

- Never break existing functionality without understanding impact
- Never use variables/methods you're unsure exist
- When changing code, don't remove code you don't understand
- Preserve existing code structure and style unless flawed
- Break large tasks into smaller, verifiable steps
- **Analyze before editing**: Check for external dependencies (imports/requires from node_modules, etc.) before modifying files. Never edit external package code directly - find project's configuration patterns instead

### Data & Security

- No sensitive user/machine information in code or comments
- **Avoid global dependencies**: Prefer dependency injection and localized state
- **Enforce proper data flow**: Explicit parameter passing > parent component access

## COMMON DEVELOPMENT TASKS

### Search & Navigation
- **Search Strategy**: Use `fd` (case-insensitive) for files, `rg` for content. Search by filename first, then content

- **Search Strategy**: Use `fd` (case-insensitive) for files, `rg` for content. Search by filename first, then content. Do not use `find` and `grep`, it is slow.
- Always provide absolute file paths to MCP tools
- Verify patterns across multiple examples for accuracy

### Code Quality

- Make function contracts clear
- First make code correct, then efficient
- Follow DRY, but not religiously SOLID
Expand All @@ -34,13 +40,16 @@
- Files should not exceed 2000 lines

### API Design

**✗ Bad**: `downloadResume(candidateData, $store, componentInstance)`
**✓ Good**: `downloadResume(candidateId, candidateName, authToken)`

- Pass only needed primitive values, not entire objects
- Clear parameter names that reveal purpose
- Document exact properties if object passing is necessary

### Testing

- BDD methodology: GIVEN/WHEN/THEN structure
- Descriptive test names reflecting scenarios
- Use `actual` for test results, `expected` for assertions
Expand All @@ -49,27 +58,32 @@
## TOOL PREFERENCES

### Commands

- Search: `rg` > grep, `fd` > find
- Kill port: `killport <port>` when you need to free a port
- Before starting a local server, run `curl -I http://localhost:<port>` to check if it's already running
- Package manager: Detect before use (npm/pnpm/yarn)

### MCP Services
- **context7**: Library/framework documentation

- **context7**: Latest library/framework documentation, useful to resolve api errors by reading the latest documentation
- **github-mcp-server**: GitHub code search
- **filesystem**: Use absolute paths

## SPECIFIC WORKFLOWS

### Anytype Notes

**Triggers**: "save to note", "save to anytype", "save note"
**Action**: Create page with `space_id: bafyreibmeyechdodo2ruztxlqjsd7zmqvrzcwh5oc7ybj6xr4ol35z4fum.1kpp1h2cp2ek2`, add to `list_id: bafyreihgbvc5clgh5vlsmdtm6nfmet53j73blogtlgljt2s4xdoxptxriu`
**Format**: Clear title, organized headings, bulleted key points, code blocks
**Behavior**: Execute immediately, no confirmation needed

### Terminal Analysis

**Trigger**: "terminal/term output analysis", "keynote creation"
**Steps**:

1. Read `~/workspace/term-buffer.txt`
2. Identify main topic and track error→solution progression
3. Create keynote with: objective, challenges, solution, insights
Expand Down
Loading