Commit graph

11 commits

Author SHA1 Message Date
Patrick Erichsen
15bbf19f2d update tests and remove debugger 2025-07-02 16:06:18 -07:00
Nate
7e1cd0ad8a change rule block creation test to match expected behavior (don't inject a header automatically) 2025-06-16 16:44:50 -07:00
Patrick Erichsen
1a9910f49e fix imports 2025-06-16 09:24:10 -07:00
Patrick Erichsen
9b8a333cf3 Update createRuleBlock.test.ts 2025-06-02 17:12:00 -07:00
Patrick Erichsen
c2571e2a86 feat: create markdown rules in notch 2025-06-02 14:33:51 -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
Patrick Erichsen
7f30061ffe update tests 2025-05-22 10:17:50 -07:00
Patrick Erichsen
e4b70dbfd8 feat: description in markdown yaml 2025-05-22 10:10:21 -07:00
Patrick Erichsen
1184c94441 test: update rule block tests 2025-04-28 18:14:48 -07:00
Patrick Erichsen
6a540e11d5 Update createRuleBlock.test.ts 2025-04-28 14:14:30 -07:00
Patrick Erichsen
047e4e418b feat: add globs to create rule tool 2025-04-25 22:41:03 -07:00