Skip to content

Commit 3a7cffc

Browse files
lunelsonvilkinsons
andauthored
H-5814: Adjust CLAUDE and AGENTS for lighter context & wider compatibility (#8173)
Co-authored-by: Dei Vilkinsons <[email protected]>
1 parent 56c236f commit 3a7cffc

File tree

39 files changed

+1010
-216
lines changed

39 files changed

+1010
-216
lines changed

.augment/rules/ark-ui.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.config/agents/rules/ark-ui.md

.augment/rules/mastra.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.config/agents/rules/mastra.md

.augment/rules/panda-css.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.config/agents/rules/panda-css.md

.augment/rules/zod.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.config/agents/rules/zod.md

.augmentignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_temp
2+
_trash
3+
_holding

.claude/skills/ark-ui/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../.config/agents/rules/ark-ui.md
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: exploring-rust-crates
3+
description: Generating Rust documentation to understand crate APIs, structure, and usage. Use when exploring Rust code, understanding crate organization, finding functions/types/traits, or needing context about a Rust package in the HASH workspace. (project)
4+
---
5+
6+
# Exploring Rust Crates
7+
8+
## Purpose
9+
10+
Guide for generating and using Rust documentation to understand crate APIs, structure, and code organization in the HASH workspace.
11+
12+
## When to Use
13+
14+
- Understanding a new Rust crate's API
15+
- Exploring available functions, types, and traits
16+
- Finding usage examples in doctest code blocks
17+
- Understanding crate organization and component relationships
18+
- Getting context about error conditions and handling
19+
- Generating test data based on documented structures
20+
21+
## Generating Documentation
22+
23+
### For a Specific Package
24+
25+
```bash
26+
cargo doc --no-deps --all-features --package <package-name>
27+
```
28+
29+
### For the Entire Workspace
30+
31+
```bash
32+
cargo doc --no-deps --all-features --workspace
33+
```
34+
35+
### Key Flags
36+
37+
- `--no-deps`: Only document local code, not dependencies (faster, less noise)
38+
- `--all-features`: Include all feature-gated APIs
39+
- `--package <name>`: Target a specific crate
40+
- `--workspace`: Document all crates in the workspace
41+
42+
## What Generated Docs Provide
43+
44+
1. **Crate organization** - Module hierarchy and component relationships
45+
2. **Public API surface** - All public functions, types, traits, and constants
46+
3. **Usage examples** - Code examples from doctest blocks
47+
4. **Error documentation** - Documented error conditions and handling
48+
5. **Type relationships** - Trait implementations, type aliases, associated types
49+
50+
## Viewing the Documentation
51+
52+
After generation, docs are available at:
53+
54+
```txt
55+
target/doc/<crate_name>/index.html
56+
```
57+
58+
Open in browser or use the content for understanding the API structure.
59+
60+
## Tips
61+
62+
- Generate docs before diving into unfamiliar Rust code
63+
- Use `--document-private-items` if you need to understand internal implementation
64+
- Cross-reference with `# Errors` sections for error handling patterns
65+
- Look for `# Examples` sections for idiomatic usage patterns
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
name: managing-git-workflow
3+
description: Git workflow for HASH including branch naming, PR creation, and PR reviews. Use when creating branches, making commits, opening pull requests, or reviewing PRs. Covers Linear issue integration (H-XXXX format), PR templates, and review procedures. (project)
4+
---
5+
6+
# Managing Git Workflow
7+
8+
## Purpose
9+
10+
Standardized git workflow for HASH development, ensuring traceability between code changes and Linear issues.
11+
12+
## When to Use
13+
14+
- Creating a new branch for a feature or fix
15+
- Opening a pull request
16+
- Reviewing someone else's PR
17+
- Understanding PR conventions
18+
19+
---
20+
21+
## Branch Naming
22+
23+
**Format:** `<shortname>/h-XXXX-description`
24+
25+
- `shortname`: Your identifier (first initial, nickname, etc.)
26+
- `h-XXXX`: Linear ticket number (lowercase 'h')
27+
- `description`: Brief kebab-case description
28+
29+
**Examples:**
30+
31+
- `t/h-4892-support-baseurl-and-version-filter`
32+
- `alice/h-1234-add-user-authentication`
33+
- `bob/h-5678-fix-database-connection`
34+
35+
**Why this matters:**
36+
37+
- Links code changes to Linear issues
38+
- Enables progress tracking on tickets
39+
- Maintains clear development history
40+
41+
---
42+
43+
## Pull Request Creation
44+
45+
### PR Title Format
46+
47+
**Format:** `H-XXXX: Description`
48+
49+
- Use uppercase 'H' in PR titles (unlike branch names)
50+
- Description should be clear and concise
51+
52+
**Examples:**
53+
54+
- `H-4922: Add branch naming instructions to CLAUDE.md`
55+
- `H-1234: Implement user authentication system`
56+
- `H-5678: Fix database connection timeout`
57+
58+
### PR Template
59+
60+
Use the template at `.github/pull_request_template.md`. Key sections:
61+
62+
1. **Purpose** - High-level explanation of what and why
63+
2. **Related links** - Linear issues, discussions, context
64+
3. **What does this change?** - Specific implementation details
65+
4. **Pre-merge checklist:**
66+
- Publishable library changes (npm/Cargo)
67+
- Documentation requirements
68+
- Turbo Graph impact
69+
5. **Known issues** - Intentional omissions or limitations
70+
6. **Next steps** - Planned follow-ups
71+
7. **Tests** - What automated tests cover this
72+
8. **How to test** - Manual testing instructions
73+
9. **Demo** - Screenshots or videos
74+
75+
---
76+
77+
## PR Review Process
78+
79+
### Step 1: Gather Information
80+
81+
Run these commands to get full context:
82+
83+
```bash
84+
# View PR metadata, description, and comments
85+
gh pr view <PR_NUMBER> --comments
86+
87+
# View ALL changes (don't truncate!)
88+
gh pr diff <PR_NUMBER>
89+
90+
# View inline diff comments
91+
gh api \
92+
-H "Accept: application/vnd.github+json" \
93+
-H "X-GitHub-Api-Version: 2022-11-28" \
94+
/repos/hashintel/hash/pulls/<PR_NUMBER>/comments
95+
```
96+
97+
**Important:** Always view the FULL diff. Don't pipe into `head` or use `--name-only`.
98+
99+
### Step 2: Check Linear Issues
100+
101+
Look for `H-XXXX` references in the PR title/description, then fetch the issue:
102+
103+
```bash
104+
# If you have Linear MCP configured:
105+
mcp__linear__get_issue --issueId "H-XXXX"
106+
107+
# Or use Linear web UI
108+
```
109+
110+
Use the Linear issue requirements as baseline for your review.
111+
112+
### Step 3: Provide Feedback
113+
114+
- Be precise about issue locations (file:line)
115+
- Include suggestions for improvement
116+
- Reference relevant code standards
117+
- Distinguish blocking issues from suggestions
118+
119+
---
120+
121+
## Quick Reference
122+
123+
| Action | Format |
124+
| ------------- | ------------------------------------------------------ |
125+
| Branch name | `<shortname>/h-XXXX-description` |
126+
| PR title | `H-XXXX: Description` |
127+
| View PR | `gh pr view <NUMBER> --comments` |
128+
| View diff | `gh pr diff <NUMBER>` |
129+
| View comments | `gh api /repos/hashintel/hash/pulls/<NUMBER>/comments` |

.claude/skills/mastra/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../.config/agents/rules/mastra.md

.claude/skills/panda-css/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../.config/agents/rules/panda-css.md

0 commit comments

Comments
 (0)