Add /ultraresearch-local for structured research combining local codebase analysis with external knowledge via parallel agent swarms. Produces research briefs with triangulation, confidence ratings, and source quality assessment. New command: /ultraresearch-local with modes --quick, --local, --external, --fg. New agents: research-orchestrator (opus), docs-researcher, community-researcher, security-researcher, contrarian-researcher, gemini-bridge (all sonnet). New template: research-brief-template.md. Integration: --research flag in /ultraplan-local accepts pre-built research briefs (up to 3), enriches the interview and exploration phases. Planning orchestrator cross-references brief findings during synthesis. Design principle: Context Engineering — right information to right agent at right time. Research briefs are structured artifacts in the pipeline: ultraresearch → brief → ultraplan --research → plan → ultraexecute. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.5 KiB
JavaScript
44 lines
1.5 KiB
JavaScript
import { describe, it, afterEach } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { readdirSync, readFileSync } from 'fs';
|
|
import { join } from 'path';
|
|
import { runHook, setupTestDir, cleanupTestDir } from './test-helper.mjs';
|
|
|
|
let dir;
|
|
afterEach(() => { if (dir) cleanupTestDir(dir); });
|
|
|
|
function readAllFiles(dirPath) {
|
|
let content = '';
|
|
for (const entry of readdirSync(dirPath, { withFileTypes: true })) {
|
|
const full = join(dirPath, entry.name);
|
|
if (entry.isDirectory()) {
|
|
content += readAllFiles(full);
|
|
} else {
|
|
content += readFileSync(full, 'utf8');
|
|
}
|
|
}
|
|
return content;
|
|
}
|
|
|
|
describe('privacy', () => {
|
|
it('never writes prompt text to disk through full lifecycle', () => {
|
|
dir = setupTestDir();
|
|
const canary = 'CANARY_PRIVACY_xyz123';
|
|
|
|
// 1. Session start
|
|
runHook('session-start.mjs', { session_id: 'priv1', cwd: '/tmp' }, dir);
|
|
|
|
// 2. Prompt analysis with canary as prompt text
|
|
runHook('prompt-analyzer.mjs', { session_id: 'priv1', prompt: `tell me what to do ${canary} am I right?` }, dir);
|
|
|
|
// 3. Tool tracking
|
|
runHook('tool-tracker.mjs', { session_id: 'priv1', tool_name: 'Edit' }, dir);
|
|
|
|
// 4. Session end
|
|
runHook('session-end.mjs', { session_id: 'priv1', cwd: '/tmp' }, dir);
|
|
|
|
// Read ALL files recursively — canary must not appear anywhere
|
|
const allContent = readAllFiles(dir);
|
|
assert.ok(!allContent.includes(canary), `Canary "${canary}" found in data files — privacy violation`);
|
|
});
|
|
});
|