mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
fd2f37eaa0
Changes: - Fix README.md agent counts (48 QE agents = 41 main + 7 subagents) - Fix README.md skill counts (15 QE-specific skills) - Fix v3/README.md agent counts (47 → 48) - Fix init-wizard.ts hooks from 'npx @agentic-qe/v3' to 'npx agentic-qe' - Complete v2 → v2/ folder reorganization (54 items moved) - Update root package.json to point to v3 as main version Verified claims: - 48 QE agents (41 main + 7 TDD subagents) - 15 QE-specific skills - 12 DDD bounded contexts - ~5,600+ tests - HNSW, ReasoningBank, Queen Coordinator features exist Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
81 lines
1.9 KiB
TypeScript
81 lines
1.9 KiB
TypeScript
/**
|
|
* Debug script to inspect web-tree-sitter AST structure
|
|
*/
|
|
|
|
import { Parser, Language } from 'web-tree-sitter';
|
|
import { join } from 'path';
|
|
|
|
async function main() {
|
|
console.log('Initializing web-tree-sitter...\n');
|
|
|
|
await Parser.init();
|
|
const parser = new Parser();
|
|
|
|
// Load TypeScript language
|
|
const wasmPath = join(process.cwd(), 'node_modules', 'tree-sitter-wasms', 'out', 'tree-sitter-typescript.wasm');
|
|
console.log('Loading WASM from:', wasmPath);
|
|
|
|
const lang = await Language.load(wasmPath);
|
|
parser.setLanguage(lang);
|
|
|
|
// Parse simple code
|
|
const code = `
|
|
export class UserService {
|
|
async getUser(id: string): Promise<User | null> {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
function helper() {
|
|
return 42;
|
|
}
|
|
`;
|
|
|
|
console.log('Parsing TypeScript code...\n');
|
|
const tree = parser.parse(code);
|
|
|
|
if (!tree) {
|
|
console.error('Failed to parse!');
|
|
return;
|
|
}
|
|
|
|
// Print AST structure
|
|
console.log('AST Structure:');
|
|
console.log('==============\n');
|
|
|
|
function printNode(node: any, indent: string = '') {
|
|
const hasChildren = node.childCount > 0;
|
|
const text = node.text?.slice(0, 50).replace(/\n/g, '\\n') || '';
|
|
|
|
console.log(`${indent}${node.type}${node.isNamed ? ' (named)' : ''} [${node.startPosition.row}:${node.startPosition.column}]`);
|
|
|
|
if (!hasChildren && text) {
|
|
console.log(`${indent} text: "${text}"`);
|
|
}
|
|
|
|
for (let i = 0; i < node.childCount; i++) {
|
|
const child = node.child(i);
|
|
if (child) {
|
|
printNode(child, indent + ' ');
|
|
}
|
|
}
|
|
}
|
|
|
|
printNode(tree.rootNode);
|
|
|
|
// Show the actual node types we're looking for
|
|
console.log('\n\nNode types we are looking for:');
|
|
console.log('- function_declaration');
|
|
console.log('- arrow_function');
|
|
console.log('- class_declaration');
|
|
console.log('- method_definition');
|
|
console.log('- interface_declaration');
|
|
console.log('- type_alias_declaration');
|
|
|
|
// Clean up
|
|
tree.delete();
|
|
parser.delete();
|
|
}
|
|
|
|
main().catch(console.error);
|