You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply EARS (Easy Approach to Requirements Syntax) patterns to make
guidelines clearer and more unambiguous:
- Ubiquitous: "The assistant shall [action]"
- Event-Driven: "When [trigger], the assistant shall [action]"
- State-Driven: "While [state], the assistant shall [action]"
- Optional: "Where [condition], the assistant shall [action]"
- Unwanted: "If [condition], then the assistant shall [action]"
This change improves clarity by explicitly stating conditions and
expected behaviors using standardized requirement syntax.
Copy file name to clipboardExpand all lines: .agents/rules/base.md
+33-31Lines changed: 33 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,22 +47,23 @@ repomix/
47
47
48
48
49
49
# Coding Guidelines
50
-
- Follow the Airbnb JavaScript Style Guide.
51
-
-Always maintain feature-based directory structure and avoid dependencies between features.
52
-
-Split files into smaller, focused units when appropriate:
53
-
- Aim to keep code files under 250 lines. If a file exceeds 250 lines, split it into multiple files based on functionality.
54
-
-Add comments to clarify non-obvious logic. **Ensure all comments are written in English.**
55
-
-Provide corresponding unit tests for all new features.
56
-
-After implementation, verify changes by running:
50
+
51
+
-The assistant shall follow the Airbnb JavaScript Style Guide.
52
+
-The assistant shall maintain feature-based directory structure and avoid dependencies between features.
53
+
-If a file exceeds 250 lines, then the assistant shall split it into multiple files based on functionality.
54
+
-Where non-obvious logic exists, the assistant shall add comments in English to clarify.
55
+
-When implementing new features, the assistant shall provide corresponding unit tests.
56
+
-When implementation is complete, the assistant shall verify changes by running:
57
57
```bash
58
58
npm run lint # Ensure code style compliance
59
59
npm run test# Verify all tests pass
60
60
```
61
61
62
62
## Commit Messages
63
-
- Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for all commit messages
64
-
- Always include a scope in your commit messages
65
-
- Format: `type(scope): Description`
63
+
64
+
- The assistant shall follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for all commit messages.
65
+
- The assistant shall always include a scope in commit messages.
66
+
- The assistant shall use the format: `type(scope): Description`
66
67
```
67
68
# Examples:
68
69
feat(cli): Add new --no-progress flag
@@ -72,18 +73,19 @@ repomix/
72
73
refactor(core): Split packager into smaller modules
73
74
test(cli): Add tests for new CLI options
74
75
```
75
-
- Types: feat, fix, docs, style, refactor, test, chore, etc.
76
-
- Scope should indicate the affected part of the codebase (cli, core, website, security, etc.)
77
-
- Description should be clear and concise in present tense
78
-
- Description must start with a capital letter
76
+
- The assistant shall use types: feat, fix, docs, style, refactor, test, chore, etc.
77
+
- The assistant shall use scope to indicate the affected part of the codebase (cli, core, website, security, etc.).
78
+
- The assistant shall write description in clear, concise present tense starting with a capital letter.
79
79
80
80
### Commit Body Guidelines
81
-
- Include context about what led to this commit
82
-
- Describe the conversation or problem that motivated the change
83
-
- This helps preserve the decision-making process for future reference
81
+
82
+
- When writing commit body, the assistant shall include context about what led to this commit.
83
+
- When writing commit body, the assistant shall describe the conversation or problem that motivated the change.
84
+
- The assistant shall preserve the decision-making process for future reference.
84
85
85
86
## Pull Request Guidelines
86
-
- All pull requests must follow the template:
87
+
88
+
- When creating a pull request, the assistant shall follow the template:
87
89
```md
88
90
<!-- Please include a summary of the changes -->
89
91
@@ -92,18 +94,20 @@ repomix/
92
94
- [ ] Run `npm run test`
93
95
- [ ] Run `npm run lint`
94
96
```
95
-
-Include a clear summary of the changes at the top of the pull request description
96
-
-Reference any related issues using the format `#issue-number`
97
+
-When creating a pull request, the assistant shall include a clear summary of the changes at the top.
98
+
-Where related issues exist, the assistant shall reference them using `#issue-number`.
97
99
98
100
## PR Review Guidelines
99
-
When reviewing pull requests, provide thoughtful feedback on:
101
+
102
+
When reviewing pull requests, the assistant shall provide thoughtful feedback on:
100
103
- Code quality and best practices
101
104
- Potential bugs or issues
102
105
- Suggestions for improvements
103
106
- Overall architecture and design decisions
104
107
105
108
## Dependencies and Testing
106
-
- Inject dependencies through a deps object parameter for testability
109
+
110
+
- The assistant shall inject dependencies through a deps object parameter for testability.
107
111
- Example:
108
112
```typescript
109
113
exportconst functionName =async (
@@ -117,21 +121,19 @@ When reviewing pull requests, provide thoughtful feedback on:
117
121
// Use deps.defaultFunction1() instead of direct call
118
122
};
119
123
```
120
-
-Mock dependencies by passing test doubles through deps object
121
-
-Use vi.mock() only when dependency injection is not feasible
124
+
-When writing tests, the assistant shall mock dependencies by passing test doubles through deps object.
125
+
-If dependency injection is not feasible, then the assistant shall use vi.mock().
122
126
123
127
## Generate Comprehensive Output
124
-
- Include all content without abbreviation, unless specified otherwise
125
-
- Optimize for handling large codebases while maintaining output quality
128
+
129
+
- The assistant shall include all content without abbreviation, unless specified otherwise.
130
+
- The assistant shall optimize for handling large codebases while maintaining output quality.
126
131
127
132
# GitHub Release Note Guidelines
128
-
When writing release notes, please follow these guidelines:
129
133
130
-
- When referencing issues or PRs, use the gh command to verify the content:
134
+
- When writing release notes, the assistant shall reference issues or PRs using gh command to verify content:
131
135
```bash
132
136
gh issue view <issue-number># For checking issue content
133
137
gh pr view <pr-number># For checking PR content
134
138
```
135
-
This helps ensure accuracy in release note descriptions.
136
-
137
-
Please retrieve and reference the latest release notes from `.github/releases/` as they contain past release examples.
139
+
- When writing release notes, the assistant shall retrieve and reference the latest release notes from `.github/releases/` as they contain past release examples.
0 commit comments