Commit graph

13 commits

Author SHA1 Message Date
Patrick Erichsen
e5f424a736 Update createRuleBlock.ts 2025-06-02 14:44:58 -07:00
Patrick Erichsen
c2571e2a86 feat: create markdown rules in notch 2025-06-02 14:33:51 -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
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
Tomasz Stefaniak
a21d350ea1 feat: markdown rules
fix: parsing
2025-05-20 13:12:17 -07:00
Patrick Erichsen
1184c94441 test: update rule block tests 2025-04-28 18:14:48 -07:00
Patrick Erichsen
fc1ee33ed9 feat: Dallin's feedback 2025-04-28 17:25:07 -07:00
Patrick Erichsen
687b893512 Update createRuleBlock.ts 2025-04-25 22:43:27 -07:00
Patrick Erichsen
047e4e418b feat: add globs to create rule tool 2025-04-25 22:41:03 -07:00
Patrick Erichsen
af1d5ed3e3 Update createRuleBlock.ts 2025-04-18 11:47:38 -07:00
Patrick Erichsen
2c8032c339 feat: create_rule_block tool 2025-04-17 21:42:52 -07:00