Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Awing Rules ClaudeCode Mcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
awing-mcp
Awing Rules ClaudeCode Mcp
Commits
ee42a81a
Commit
ee42a81a
authored
Feb 02, 2026
by
LongLD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ensure global rules appear in tag-filtered searches
parent
a03fec9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
dist/rules/scorer.js
dist/rules/scorer.js
+7
-1
src/rules/scorer.ts
src/rules/scorer.ts
+10
-1
No files found.
dist/rules/scorer.js
View file @
ee42a81a
...
...
@@ -91,8 +91,14 @@ export class Scorer {
calculateTagScore
(
rule
,
queryTags
)
{
if
(
!
queryTags
||
queryTags
.
length
===
0
)
return
0
;
// Global rules always get partial tag score even without matching tags
const
isGlobalRule
=
rule
.
tags
.
includes
(
'
global
'
)
||
rule
.
tags
.
includes
(
'
base
'
)
||
rule
.
id
.
includes
(
'
base
'
);
const
intersection
=
rule
.
tags
.
filter
(
t
=>
queryTags
.
includes
(
t
));
return
intersection
.
length
>
0
?
Math
.
min
(
1
,
intersection
.
length
/
queryTags
.
length
)
:
0
;
if
(
intersection
.
length
>
0
)
{
return
Math
.
min
(
1
,
intersection
.
length
/
queryTags
.
length
);
}
// Give global rules a small positive score to ensure they appear in filtered results
return
isGlobalRule
?
0.3
:
0
;
}
calculatePriorityScore
(
rule
)
{
return
(
rule
.
priority
||
50
)
/
100
;
...
...
src/rules/scorer.ts
View file @
ee42a81a
...
...
@@ -110,8 +110,17 @@ export class Scorer {
private
calculateTagScore
(
rule
:
Rule
,
queryTags
:
string
[]):
number
{
if
(
!
queryTags
||
queryTags
.
length
===
0
)
return
0
;
// Global rules always get partial tag score even without matching tags
const
isGlobalRule
=
rule
.
tags
.
includes
(
'
global
'
)
||
rule
.
tags
.
includes
(
'
base
'
)
||
rule
.
id
.
includes
(
'
base
'
);
const
intersection
=
rule
.
tags
.
filter
(
t
=>
queryTags
.
includes
(
t
));
return
intersection
.
length
>
0
?
Math
.
min
(
1
,
intersection
.
length
/
queryTags
.
length
)
:
0
;
if
(
intersection
.
length
>
0
)
{
return
Math
.
min
(
1
,
intersection
.
length
/
queryTags
.
length
);
}
// Give global rules a small positive score to ensure they appear in filtered results
return
isGlobalRule
?
0.3
:
0
;
}
private
calculatePriorityScore
(
rule
:
Rule
):
number
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment