mirror of
https://github.com/kochetkov-ma/claude-brewcode.git
synced 2026-09-14 20:16:41 +08:00
ea944a32fe
- New /brewdoc:docsync skill: user-run generator installs project-local hooks (track/watch/gate) + config; tracks stale docs by last_updated date; modes init/status/sync/reread/frontmatter/uninstall; confirm-before-sync gate - Removed auto-sync skill, bd-auto-sync-processor agent, auto-sync:* frontmatter tags (~44 files), and skill-creator template injection - Docs updated at all levels (README, MDX, navigation, guide catalog, CLAUDE.md)
27 lines
788 B
JavaScript
27 lines
788 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { readInput, respond } from './lib/io.mjs';
|
|
import { PROMPT_CONTEXT, promptIsDue } from './lib/prompt-cadence.mjs';
|
|
|
|
try {
|
|
const input = await readInput();
|
|
if (input.hook_event_name !== 'UserPromptSubmit' || !promptIsDue(input.session_id)) {
|
|
respond({});
|
|
} else {
|
|
const prompt = typeof input.prompt === 'string' ? input.prompt.trim() : '';
|
|
const skip = /^(?:yes|no|y|n|ok|okay|thanks|done|cancel|stop|continue|proceed|approved?|confirm(?:ed)?|\d+)$/i;
|
|
if (!prompt || prompt.startsWith('$') || skip.test(prompt)) {
|
|
respond({});
|
|
} else {
|
|
respond({
|
|
hookSpecificOutput: {
|
|
hookEventName: 'UserPromptSubmit',
|
|
additionalContext: PROMPT_CONTEXT
|
|
}
|
|
});
|
|
}
|
|
}
|
|
} catch {
|
|
respond({});
|
|
}
|