Skip to content

Commit 8090109

Browse files
authored
chore: regenerate agent instructions with Ruler (#41)
1 parent 440c52e commit 8090109

16 files changed

Lines changed: 2400 additions & 2240 deletions

File tree

.augment/rules/ruler_augment_instructions.md

Lines changed: 150 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,132 @@
11
---
2-
Source: .ruler/changesets.md
2+
Source: .ruler/commit-push.md
3+
---
4+
# /commit-push — Commit and push workflow
5+
6+
Stage, commit with conventional format, and push with upstream tracking.
7+
8+
## Quick Workflow
9+
10+
```bash
11+
git add .
12+
git commit -m "feat: add new feature"
13+
git push -u origin <branch> # First push
14+
git push # Subsequent pushes
15+
```
16+
17+
## Commit Types
18+
19+
| Type | Purpose |
20+
|------|---------|
21+
| `feat:` | New feature |
22+
| `fix:` | Bug fix |
23+
| `docs:` | Documentation |
24+
| `refactor:` | Code restructuring |
25+
| `chore:` | Build/tooling |
26+
| `perf:` | Performance |
27+
| `test:` | Tests |
28+
29+
## Pre-commit (auto-detected package manager)
30+
31+
```bash
32+
$PM run format && $PM run lint && $PM run check
33+
```
34+
35+
## Examples
36+
37+
```bash
38+
# Feature
39+
feat: add user authentication
40+
41+
# Bug fix with scope
42+
fix(auth): resolve login error
43+
44+
# Breaking change
45+
feat!: change API interface
46+
47+
BREAKING CHANGE: Method requires email parameter
48+
```
49+
50+
## Troubleshooting
51+
52+
```bash
53+
git commit --amend -m "new message" # Fix last commit
54+
git reset --soft HEAD~1 # Undo commit, keep changes
55+
```
56+
57+
## Guidelines
58+
59+
- Atomic commits (one logical change)
60+
- Present tense: "Add" not "Added"
61+
- Under 72 characters
62+
- No co-authorship in commits
63+
- Reference issues: `Closes #123`
64+
365
---
66+
Source: .ruler/ruler-apply.md
67+
---
68+
# /ruler-apply — Regenerate agent instructions with Ruler
69+
70+
Use this command whenever `.ruler/` files or command documentation changes, or after pulling updates that touch repository rules.
71+
72+
## When to Run
73+
- After editing any file under `.ruler/` (including `commands/` docs referenced from there)
74+
- Before committing changes that rely on regenerated instruction files such as `AGENTS.md`
75+
- After rebasing or pulling main when rules may have changed
76+
77+
## Command Sequence
78+
```fish
79+
# Regenerate agent instruction files
80+
pnpm run ruler:apply
81+
82+
# Double-check that regeneration left the tree clean
83+
pnpm run ruler:check
84+
```
85+
86+
## What to Inspect
87+
- Review `git status` for modified instruction outputs (e.g., `AGENTS.md`, `.cursor/...`).
88+
- If files changed, skim the diff to ensure new content reflects your rule updates.
89+
- Commit regenerated files together with the rule change so other contributors stay in sync.
90+
91+
## Troubleshooting
92+
- If `pnpm run ruler:check` reports a dirty tree, run `git status --short` to see which files still differ.
93+
- For merge conflicts in generated files, resolve them in the source `.ruler/` Markdown first, re-run `/ruler-apply`, then commit the regenerated outputs.
94+
- When `.gitignore` changes unexpectedly, confirm `[gitignore].enabled` in `.ruler/ruler.toml` matches the desired setting before re-running the command.
95+
96+
---
97+
Source: .ruler/shell-usage.md
98+
---
99+
# Shell Usage Standard (Fish)
100+
101+
This repository uses the Fish shell for interactive commands and automation snippets, aligned with the system configuration. Prefer Fish for new scripts and examples.
102+
103+
## Policy
104+
- Default shell: Fish (`#!/usr/bin/env fish`).
105+
- Provide Fish snippets for automation examples; keep Bash as optional fallback when helpful.
106+
- Keep one-file, shell-agnostic command sequences unchanged when they work in both shells.
107+
108+
## Conventions
109+
- Variables: `set NAME value` (no `=`). Export: `set -x NAME value`.
110+
- Arrays/lists: `set items a b c`; append: `set items $items d`.
111+
- Conditionals: `if test -f file; ...; end`; switches: `switch $var; case value; ...; end`.
112+
- Substitution: `set VAR (command ...)`.
113+
- PATH: `set -x PATH /new/bin $PATH`.
114+
115+
## Shebangs
116+
- Use `#!/usr/bin/env fish` for executable scripts.
117+
118+
## Compatibility Notes
119+
- Avoid `set -euo pipefail`; Fish handles errors differently. Use explicit checks or `status` as needed.
120+
- When porting Bash snippets, verify quoting and list handling.
121+
122+
---
123+
Source: .ruler/skills/changesets/SKILL.md
124+
---
125+
---
126+
allowed-tools: Read, Glob, Grep, Write, Bash, TodoWrite
127+
description: Generate changeset entries following Changesets semantics
128+
---
129+
4130
# /changesets — Generate changeset entries
5131

6132
Generate release documentation entries following Changesets semantics.
@@ -54,23 +180,13 @@ Replaced legacy serializer with new wire format
54180
- Include in same commit as code changes
55181

56182
---
57-
Source: .ruler/commands.md
183+
Source: .ruler/skills/commit-lint/SKILL.md
58184
---
59-
# Commands
60-
61-
| Command | Description |
62-
|---------|-------------|
63-
| [/changesets](changesets.md) | Generate changeset entries |
64-
| [/commit-lint](commit-lint.md) | Commit message validation |
65-
| [/commit-push](commit-push.md) | Commit and push workflow |
66-
| [/issue-create](issue-create.md) | Create Linear issues |
67-
| [/pr-create](pr-create.md) | Create pull requests |
68-
| [/pr-label](pr-label.md) | Label pull requests |
69-
| [/serena](serena.md) | Problem-solving with Serena MCP |
70-
71185
---
72-
Source: .ruler/commit-lint.md
186+
allowed-tools: Read, Bash, TodoWrite
187+
description: Validate commit messages against conventional commit format
73188
---
189+
74190
# /commit-lint — Commit message validation
75191

76192
Ensure commits follow conventional commit format and pass quality checks.
@@ -138,72 +254,13 @@ BREAKING CHANGE: Method now requires email parameter
138254
- AI attribution goes in PR description, not commits
139255

140256
---
141-
Source: .ruler/commit-push.md
257+
Source: .ruler/skills/issue-create/SKILL.md
142258
---
143-
# /commit-push — Commit and push workflow
144-
145-
Stage, commit with conventional format, and push with upstream tracking.
146-
147-
## Quick Workflow
148-
149-
```bash
150-
git add .
151-
git commit -m "feat: add new feature"
152-
git push -u origin <branch> # First push
153-
git push # Subsequent pushes
154-
```
155-
156-
## Commit Types
157-
158-
| Type | Purpose |
159-
|------|---------|
160-
| `feat:` | New feature |
161-
| `fix:` | Bug fix |
162-
| `docs:` | Documentation |
163-
| `refactor:` | Code restructuring |
164-
| `chore:` | Build/tooling |
165-
| `perf:` | Performance |
166-
| `test:` | Tests |
167-
168-
## Pre-commit (auto-detected package manager)
169-
170-
```bash
171-
$PM run format && $PM run lint && $PM run check
172-
```
173-
174-
## Examples
175-
176-
```bash
177-
# Feature
178-
feat: add user authentication
179-
180-
# Bug fix with scope
181-
fix(auth): resolve login error
182-
183-
# Breaking change
184-
feat!: change API interface
185-
186-
BREAKING CHANGE: Method requires email parameter
187-
```
188-
189-
## Troubleshooting
190-
191-
```bash
192-
git commit --amend -m "new message" # Fix last commit
193-
git reset --soft HEAD~1 # Undo commit, keep changes
194-
```
195-
196-
## Guidelines
197-
198-
- Atomic commits (one logical change)
199-
- Present tense: "Add" not "Added"
200-
- Under 72 characters
201-
- No co-authorship in commits
202-
- Reference issues: `Closes #123`
203-
204259
---
205-
Source: .ruler/issue-create.md
260+
allowed-tools: Read, Bash, TodoWrite, mcp__Linear__*
261+
description: Create Linear issues with proper assignment and labeling
206262
---
263+
207264
# /issue-create — Create Linear issues
208265

209266
Create Linear issues with proper assignment and labeling.
@@ -245,8 +302,13 @@ Assign all issues to `shunkakinoki`.
245302
- Close only after verifying acceptance criteria
246303

247304
---
248-
Source: .ruler/pr-create.md
305+
Source: .ruler/skills/pr-create/SKILL.md
249306
---
307+
---
308+
allowed-tools: Read, Bash, TodoWrite
309+
description: Create GitHub PRs with proper formatting, labeling, and quality checks
310+
---
311+
250312
# /pr-create — Create pull requests
251313

252314
Create GitHub PRs with proper formatting, labeling, and quality checks.
@@ -270,7 +332,7 @@ gh pr create \
270332
## Testing
271333
- All checks pass
272334
273-
🤖 Generated with [AI_TOOL] by [AI_MODEL]" \
335+
Generated with [AI_TOOL] by [AI_MODEL]" \
274336
--base main
275337
```
276338

@@ -294,7 +356,7 @@ gh pr merge $(gh pr view --json number -q '.number') --squash --auto
294356
## Testing
295357
- Verification steps
296358

297-
🤖 Generated with [AI_TOOL] by [AI_MODEL]
359+
Generated with [AI_TOOL] by [AI_MODEL]
298360
```
299361

300362
## Labeling
@@ -315,8 +377,13 @@ gh pr edit <number> --add-label documentation # docs:
315377
- Run quality checks before creating
316378

317379
---
318-
Source: .ruler/pr-label.md
380+
Source: .ruler/skills/pr-label/SKILL.md
381+
---
319382
---
383+
allowed-tools: Read, Bash
384+
description: Apply labels to PRs based on conventional commit types
385+
---
386+
320387
# /pr-label — Label pull requests
321388

322389
Apply labels to PRs based on conventional commit types.
@@ -354,38 +421,7 @@ gh pr edit <number> --add-label <label>
354421
- Labels are provisioned via Pulumi from `labels.ts`
355422

356423
---
357-
Source: .ruler/ruler-apply.md
358-
---
359-
# /ruler-apply — Regenerate agent instructions with Ruler
360-
361-
Use this command whenever `.ruler/` files or command documentation changes, or after pulling updates that touch repository rules.
362-
363-
## When to Run
364-
- After editing any file under `.ruler/` (including `commands/` docs referenced from there)
365-
- Before committing changes that rely on regenerated instruction files such as `AGENTS.md`
366-
- After rebasing or pulling main when rules may have changed
367-
368-
## Command Sequence
369-
```fish
370-
# Regenerate agent instruction files
371-
pnpm run ruler:apply
372-
373-
# Double-check that regeneration left the tree clean
374-
pnpm run ruler:check
375-
```
376-
377-
## What to Inspect
378-
- Review `git status` for modified instruction outputs (e.g., `AGENTS.md`, `.cursor/...`).
379-
- If files changed, skim the diff to ensure new content reflects your rule updates.
380-
- Commit regenerated files together with the rule change so other contributors stay in sync.
381-
382-
## Troubleshooting
383-
- If `pnpm run ruler:check` reports a dirty tree, run `git status --short` to see which files still differ.
384-
- For merge conflicts in generated files, resolve them in the source `.ruler/` Markdown first, re-run `/ruler-apply`, then commit the regenerated outputs.
385-
- When `.gitignore` changes unexpectedly, confirm `[gitignore].enabled` in `.ruler/ruler.toml` matches the desired setting before re-running the command.
386-
387-
---
388-
Source: .ruler/serena.md
424+
Source: .ruler/skills/serena/SKILL.md
389425
---
390426
---
391427
allowed-tools: Read, Glob, Grep, Edit, MultiEdit, Write, Bash, TodoWrite, mcp__serena__*, mcp__context7__*
@@ -442,32 +478,6 @@ Use Serena MCP for structured app development and debugging.
442478
- Use `--focus=AREA` for domain-specific analysis
443479
- Combine related problems in single session
444480

445-
---
446-
Source: .ruler/shell-usage.md
447-
---
448-
# Shell Usage Standard (Fish)
449-
450-
This repository uses the Fish shell for interactive commands and automation snippets, aligned with the system configuration. Prefer Fish for new scripts and examples.
451-
452-
## Policy
453-
- Default shell: Fish (`#!/usr/bin/env fish`).
454-
- Provide Fish snippets for automation examples; keep Bash as optional fallback when helpful.
455-
- Keep one-file, shell-agnostic command sequences unchanged when they work in both shells.
456-
457-
## Conventions
458-
- Variables: `set NAME value` (no `=`). Export: `set -x NAME value`.
459-
- Arrays/lists: `set items a b c`; append: `set items $items d`.
460-
- Conditionals: `if test -f file; ...; end`; switches: `switch $var; case value; ...; end`.
461-
- Substitution: `set VAR (command ...)`.
462-
- PATH: `set -x PATH /new/bin $PATH`.
463-
464-
## Shebangs
465-
- Use `#!/usr/bin/env fish` for executable scripts.
466-
467-
## Compatibility Notes
468-
- Avoid `set -euo pipefail`; Fish handles errors differently. Use explicit checks or `status` as needed.
469-
- When porting Bash snippets, verify quoting and list handling.
470-
471481
---
472482
Source: .ruler/tool-search.md
473483
---

0 commit comments

Comments
 (0)