-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: condense rules — CLAUDE.md 300→41 lines #68
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
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,11 @@ | ||
| # /commit-push — Commit and push workflow | ||
|
|
||
| Stage, commit with conventional format, and push with upstream tracking. | ||
|
|
||
| ## Quick Workflow | ||
|
|
||
| ```bash | ||
| git add . | ||
| git commit -m "feat: add new feature" | ||
| git push -u origin <branch> # First push | ||
| git push # Subsequent pushes | ||
| ``` | ||
|
|
||
| ## Commit Types | ||
|
|
||
| | Type | Purpose | | ||
| |------|---------| | ||
| | `feat:` | New feature | | ||
| | `fix:` | Bug fix | | ||
| | `docs:` | Documentation | | ||
| | `refactor:` | Code restructuring | | ||
| | `chore:` | Build/tooling | | ||
| | `perf:` | Performance | | ||
| | `test:` | Tests | | ||
|
|
||
| ## Pre-commit (auto-detected package manager) | ||
|
|
||
| ```bash | ||
| $PM run format && $PM run lint && $PM run check | ||
| ``` | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # Feature | ||
| feat: add user authentication | ||
|
|
||
| # Bug fix with scope | ||
| fix(auth): resolve login error | ||
|
|
||
| # Breaking change | ||
| feat!: change API interface | ||
|
|
||
| BREAKING CHANGE: Method requires email parameter | ||
| git commit -m "type: description" # feat|fix|docs|refactor|chore|perf|test | ||
| git push -u origin <branch> | ||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ```bash | ||
| git commit --amend -m "new message" # Fix last commit | ||
| git reset --soft HEAD~1 # Undo commit, keep changes | ||
| ``` | ||
|
|
||
| ## Guidelines | ||
|
|
||
| - Atomic commits (one logical change) | ||
| - Present tense: "Add" not "Added" | ||
| - Under 72 characters | ||
| - No co-authorship in commits | ||
| - Reference issues: `Closes #123` | ||
| - Atomic commits, present tense, under 72 chars | ||
| - No co-authorship. Reference issues: `Closes #123` | ||
| - Pre-commit: `$PM run format && $PM run lint && $PM run check` | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,27 +1,10 @@ | ||||||
| # /ruler-apply — Regenerate agent instructions with Ruler | ||||||
| # /ruler-apply — Regenerate agent instructions | ||||||
|
|
||||||
| Use this command whenever `.ruler/` files or command documentation changes, or after pulling updates that touch repository rules. | ||||||
| Run after editing `.ruler/` files or pulling rule changes: | ||||||
|
|
||||||
| ## When to Run | ||||||
| - After editing any file under `.ruler/` (including `commands/` docs referenced from there) | ||||||
| - Before committing changes that rely on regenerated instruction files such as `AGENTS.md` | ||||||
| - After rebasing or pulling main when rules may have changed | ||||||
|
|
||||||
| ## Command Sequence | ||||||
| ```fish | ||||||
| # Regenerate agent instruction files | ||||||
| ```bash | ||||||
|
||||||
| ```bash | |
| ```sh |
Copilot
AI
Feb 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command examples use pnpm run ..., but this repo is configured with packageManager: bun@... and scripts are intended to be run via the active package manager. Consider switching these lines to bun run ... or using the $PM run ... convention used elsewhere, so the instructions work in a fresh checkout without pnpm installed.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,8 @@ | ||
| # Shell Usage Standard (Fish) | ||
| # Shell Usage — Fish | ||
|
|
||
| This repository uses the Fish shell for interactive commands and automation snippets, aligned with the system configuration. Prefer Fish for new scripts and examples. | ||
|
|
||
| ## Policy | ||
| - Default shell: Fish (`#!/usr/bin/env fish`). | ||
| - Provide Fish snippets for automation examples; keep Bash as optional fallback when helpful. | ||
| - Keep one-file, shell-agnostic command sequences unchanged when they work in both shells. | ||
|
|
||
| ## Conventions | ||
| - Variables: `set NAME value` (no `=`). Export: `set -x NAME value`. | ||
| - Arrays/lists: `set items a b c`; append: `set items $items d`. | ||
| - Conditionals: `if test -f file; ...; end`; switches: `switch $var; case value; ...; end`. | ||
| - Substitution: `set VAR (command ...)`. | ||
| - PATH: `set -x PATH /new/bin $PATH`. | ||
|
|
||
| ## Shebangs | ||
| - Use `#!/usr/bin/env fish` for executable scripts. | ||
|
|
||
| ## Compatibility Notes | ||
| - Avoid `set -euo pipefail`; Fish handles errors differently. Use explicit checks or `status` as needed. | ||
| - When porting Bash snippets, verify quoting and list handling. | ||
| Default shell: Fish (`#!/usr/bin/env fish`). | ||
|
|
||
| - Variables: `set NAME value`, export: `set -x NAME value` | ||
| - Substitution: `set VAR (command ...)` | ||
| - Conditionals: `if test -f file; ...; end` | ||
| - No `set -euo pipefail` — use explicit checks |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,151 +1,9 @@ | ||||||||||||||||||
| # Tool Search Guidelines | ||||||||||||||||||
| # Tool Search | ||||||||||||||||||
|
|
||||||||||||||||||
| This document defines the preferred tools and methodologies for searching and analyzing code within the repository. These tools are optimized for different types of search tasks and should be used according to the patterns outlined below. | ||||||||||||||||||
| - **Files**: `fd` — `fd '*.ts'`, `fd config.json` | ||||||||||||||||||
| - **Text**: `rg` — `rg "pattern" -A 3`, `rg -i "todo"` | ||||||||||||||||||
| - **Code structure**: `ast-grep --lang ts -p 'function $NAME($ARGS) { $$$ }'` | ||||||||||||||||||
| - **Interactive**: `fzf` — `fd '*.ts' | fzf` | ||||||||||||||||||
|
Comment on lines
+3
to
+6
|
||||||||||||||||||
| - **Files**: `fd` — `fd '*.ts'`, `fd config.json` | |
| - **Text**: `rg` — `rg "pattern" -A 3`, `rg -i "todo"` | |
| - **Code structure**: `ast-grep --lang ts -p 'function $NAME($ARGS) { $$$ }'` | |
| - **Interactive**: `fzf` — `fd '*.ts' | fzf` | |
| - **Files**: `fd` — `fd '*.md'`, `fd config.json` | |
| - **Text**: `rg` — `rg "pattern" -A 3`, `rg -i "todo"` | |
| - **Code structure**: `ast-grep --lang <lang> -p 'function $NAME($ARGS) { $$$ }'` | |
| - **Interactive**: `fzf` — `fd '*.md' | fzf` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,3 @@ | ||
| # Workspace File Reference Rule | ||
| # Workspace File References | ||
|
|
||
| ## Overview | ||
|
|
||
| This rule governs how workspace files (such as `.code-workspace` files) should reference directories and paths. | ||
|
|
||
| ## Rule | ||
|
|
||
| **DO NOT** refer to the dotagents directory (`../dotagents` or similar) in workspace files. The dotagents directory is for reference only and should not be included as a workspace folder. | ||
|
|
||
| Instead, use the current directory path with "." (e.g., `"."`) or reference the appropriate workspace/directory directly. | ||
|
|
||
| ## Examples | ||
|
|
||
| ### Incorrect: | ||
| ```json | ||
| { | ||
| "folders": [ | ||
| { | ||
| "name": "dotagents", | ||
| "path": "../dotagents" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ### Correct: | ||
| ```json | ||
| { | ||
| "folders": [ | ||
| { | ||
| "name": "dotfiles", | ||
| "path": "." | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ## Rationale | ||
|
|
||
| The dotagents directory contains configuration and reference materials that should not be part of the active workspace. Including it can cause confusion and unnecessary clutter in the workspace structure. | ||
| Do **not** reference `../dotagents` in workspace files. Use `"."` for the current directory. The dotagents directory is for reference only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inline commit type list (
feat|fix|docs|refactor|chore|perf|test) appears to omit types that are documented/validated elsewhere in the repo (e.g.,/commit-lintincludesstyle,ci,build,revert). To avoid implying those types are invalid, either expand this list or rephrase it as non-exhaustive (e.g., “common types”).