feat(research): merge repository research and tune QMD search coverage

Research skills:
- Merge repository-research into research as a Repository section, so an
  open repository search loads one skill fewer; move its evals and update
  every reference.
- Tune semantic-search for QMD: one question per search, known domain
  terms in the query, --top-k 10 for survey questions, a small-repository
  exception, and a Coverage section stating what the index skips.

QMD search:
- Widen the index file mask to web templates and styles, .NET and WPF
  markup and project files, JVM build files, and more script modules, and
  reapply it to existing repository collections.
- Add qmd-search.mjs --get to read qmd:// hits from other collections.
- List the exact search command in the Claude sandbox excludedCommands,
  because the macOS/Linux sandbox blocks the localhost daemon and the
  index under the home directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian LechnerandClaude Opus 5.5 committed 2026-11-16 10:15:44 +01:00
1 parent 82d9992b3a
commit eb7cecaaa2
18 files changed
+142 -95

No files matched your search

+11 -1
View File
@@ -88,12 +88,22 @@ export async function runSearch({ root, query, topK, daemon = callDaemon, startD
}
}
// Hits from the user's own collections are qmd:// URIs, which only QMD can resolve to a file; no model is loaded.
export function getDocument(uri, cli = runQmdCli) {
if (!/^qmd:\/\/[^/]+\/.+/.test(uri)) throw new Error('--get needs a qmd://<collection>/<path> URI');
return cli(['get', uri], { windowsHide: true });
}
async function main() {
const { values } = parseArgs({ options: { query: { type: 'string' }, 'top-k': { type: 'string', default: '5' }, root: { type: 'string' }, stop: { type: 'boolean' } } });
const { values } = parseArgs({ options: { query: { type: 'string' }, 'top-k': { type: 'string', default: '5' }, root: { type: 'string' }, stop: { type: 'boolean' }, get: { type: 'string' } } });
if (values.stop) {
try { await callDaemon('/stop', {}); } catch { /* nothing running */ }
return;
}
if (values.get !== undefined) {
process.stdout.write(getDocument(values.get));
return;
}
if (!values.query?.trim()) throw new Error('--query is required');
const root = resolve(values.root || execFileSync('git', ['rev-parse', '--show-toplevel'], { encoding: 'utf8' }).trim());
const topK = Math.min(Math.max(Number(values['top-k']) || 5, 1), 20);