Commit graph

46 commits

Author SHA1 Message Date
Tomasz Stefaniak
4d278e479a fix: prettier 2025-06-11 15:23:09 -07:00
Tomasz Stefaniak
e8ecedb36d improv: simplify 2025-06-11 15:09:08 -07:00
Tomasz Stefaniak
b553630f2a improv: constants 2025-06-11 15:04:13 -07:00
Tomasz Stefaniak
f1026c6a2c fix: uri utils 2025-06-11 14:39:40 -07:00
Tomasz Stefaniak
9dba4730b9 fix: type errors / formatting 2025-06-09 17:11:55 -07:00
Tomasz Stefaniak
a7f6f99edc test: cleanup 2025-06-09 15:58:08 -07:00
Tomasz Stefaniak
5f63bcbd06 improv: remove unused code 2025-06-09 15:54:27 -07:00
Tomasz Stefaniak
ab0222d1cf improv: remove logs 2025-06-09 15:54:01 -07:00
Tomasz Stefaniak
fb282727e9 fix: colocation 2025-06-09 15:51:36 -07:00
Tomasz Stefaniak
e1d227cbc3 fix: colocation 2025-06-09 15:49:18 -07:00
Tomasz Stefaniak
e4f7188b8b Update nestedDirectoryRules.vitest.ts 2025-06-09 14:09:27 -07:00
Tomasz Stefaniak
d08ed5f780 test: rules 2025-06-09 13:58:56 -07:00
Tomasz Stefaniak
9e57412fe1 fix: rules 2025-06-09 13:51:04 -07:00
Tomasz Stefaniak
2178ef8b05 Create implicitGlobalRules.vitest.ts 2025-06-09 13:48:50 -07:00
Tomasz Stefaniak
5d51f729ff improv: rules 2025-06-09 13:43:43 -07:00
Tomasz Stefaniak
cafb2e93c7 fix: tests 2025-06-09 13:22:34 -07:00
Tomasz Stefaniak
f29110f98b fix: rules 2025-06-09 13:11:19 -07:00
Tomasz Stefaniak
c2707c6988 fix: system message 2025-06-09 12:54:13 -07:00
Tomasz Stefaniak
a7a6c5cb43 test: globs 2025-06-09 12:49:35 -07:00
Tomasz Stefaniak
2ec5ad7eba Update ruleColocation.vitest.ts 2025-06-09 11:26:34 -07:00
Tomasz Stefaniak
b5b4b0d31d test: colocation 2025-06-09 11:02:12 -07:00
Tomasz Stefaniak
9efd0e128e fix: formatting 2025-06-02 13:51:36 -07:00
Patrick Erichsen
1b59411ec1 chore: continue bot feedback 2025-05-25 19:47:12 -07:00
Patrick Erichsen
e2e4f94e8d Add alwaysApply property to rules for better control over rule application
This commit introduces an optional `alwaysApply` boolean property to rules that provides fine-grained control over when rules are included in system messages.

## Behavior

- `alwaysApply: true` - Always include the rule, regardless of file context
- `alwaysApply: false` - Only include if globs exist AND match file context
- `alwaysApply: undefined` - Default behavior: include if no globs OR globs match

## Changes

- Added `alwaysApply?: boolean` to `RuleWithSource` interface
- Updated `parseMarkdownRule` to handle frontmatter `alwaysApply` property
- Enhanced `shouldApplyRule` function with explicit logic for all three states
- Added `alwaysApply` to createRuleBlock tool definition and implementation
- Updated UI logic in RulesPeek component to match backend behavior
- Added comprehensive test coverage for all scenarios
- Updated documentation to mention Markdown file support for rules

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-25 19:27:15 -07:00
Tomasz Stefaniak
17a249c1ce test: generating system message 2025-05-21 12:46:59 -07:00
Tomasz Stefaniak
bdc2ec8374 fix: missing context items 2025-05-21 12:37:43 -07:00
Tomasz Stefaniak
64fb928b8f fix: matching context code 2025-05-20 18:06:56 -07:00
Tomasz Stefaniak
53f06795d3 feat: display rules used 2025-05-14 16:01:29 -07:00
Patrick Erichsen
24e22db9d4 feat: globs on rules and block docs 2025-04-24 17:35:23 -07:00
Dallin Romney
afd7244548 fix rules not being included in agent mode 2025-04-22 14:54:30 -07:00
Dallin Romney
c277890b40 edit prompts 2025-04-10 21:56:04 -07:00
Dallin Romney
99a5d5e980 v12 2025-04-10 17:58:32 -07:00
Dallin Romney
7e6da30421 broken yeet 2025-04-09 14:44:31 -07:00
tomasz-io
cb2e0a7c0e fix: failing tests 2025-04-03 14:48:00 -07:00
tomasz-io
6d27ac6777 test: rules 2025-04-03 14:05:53 -07:00
tomasz-io
81acb44601 fix: tests 2025-04-03 14:03:14 -07:00
tomasz-io
2b97efe5c6 fix: isRuleActive 2025-04-03 14:00:15 -07:00
tomasz-io
211fcb7740 feat: if-rule 2025-04-03 13:36:33 -07:00
tomasz-io
b39cb836ad fix: rules 2025-04-03 12:40:46 -07:00
tomasz-io
a6dd5a83de fix: if rules 2025-04-03 12:38:30 -07:00
tomasz-io
06b76d752f feat: if-rules 2025-04-03 12:32:25 -07:00
tomasz-io
2620064c53 feat: rules 2025-04-03 12:27:22 -07:00
tomasz-io
6224af63d3 feat: if rules 2025-04-03 11:54:53 -07:00
tomasz-io
05a3eec21e fix: regex 2025-04-03 11:49:16 -07:00
tomasz-io
9baa4e93be feat: if-rule 2025-04-03 10:29:13 -07:00
tomasz-io
1a1b854fda feat: evaluate rule 2025-04-02 16:05:39 -07:00