feat(skills): reworked skills and rules
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
This commit is contained in:
1 parent
29632ff0ce
commit
f5d8f6f11b
124 files changed
+1250
-8138
No files matched your search
@@ -35,7 +35,9 @@ SEARCH_TOOLS = ('Grep', 'Glob')
|
||||
# shortcut: matches command text, not parsed shells; a wrapped or aliased search slips through, which only skips a reminder.
|
||||
SEARCH_COMMAND = re.compile(r'(?:^|[\s;&|(])(?:rg|grep|egrep|fgrep|findstr|find|fd|ag|ack|select-string|sls|git\s+grep|'
|
||||
r'(?:get-childitem|gci|ls|dir)\b[^|;&]*\s-(?:recurse|r)\b)(?=\s|$)', re.I)
|
||||
SEARCH_CONTEXT = ('Search reminder (once per session): for open searches - unknown locations or identifiers, behavior '
|
||||
# Searches without qmd-search before the reminder repeats; covers long sessions and context lost to compaction.
|
||||
REMIND_EVERY = 10
|
||||
SEARCH_CONTEXT = ('Search reminder: for open searches - unknown locations or identifiers, behavior '
|
||||
'questions, discovery, or claims that something is absent - run `semantic-search` first: '
|
||||
'node "$HOME/' + QMD_SEARCH + '" --query "<full question>" --top-k 5. Known paths, symbols, and exact '
|
||||
'strings may use rg/Grep directly. An empty pattern search does not prove absence.')
|
||||
@@ -102,11 +104,19 @@ def remind_search(event):
|
||||
if not used_qmd and tool not in SEARCH_TOOLS and not SEARCH_COMMAND.search(command):
|
||||
return
|
||||
marker = search_marker(session)
|
||||
if marker.is_symlink() or marker.exists():
|
||||
if marker.is_symlink():
|
||||
return
|
||||
prune_markers(marker.parent, time.time())
|
||||
marker.touch()
|
||||
if not used_qmd:
|
||||
if marker.exists():
|
||||
try:
|
||||
count = int(marker.read_text(encoding='utf-8') or '0') + 1
|
||||
except ValueError:
|
||||
count = 1
|
||||
else:
|
||||
prune_markers(marker.parent, time.time())
|
||||
count = REMIND_EVERY
|
||||
remind = not used_qmd and count >= REMIND_EVERY
|
||||
marker.write_text('0' if used_qmd or remind else str(count), encoding='utf-8')
|
||||
if remind:
|
||||
print(json.dumps({'hookSpecificOutput': {'hookEventName': 'PreToolUse', 'additionalContext': SEARCH_CONTEXT}}))
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user