sverklo audit
B
Overall Health
A
Dead code
0% orphan symbols (0/1133)
B
Circular deps
1 cycle detected
A
Coupling
max fan-in: 9 (packages/core/src/db/connection.ts)
F
Security
96 concerns found
Overview
- 405 files indexed
- 1910 code symbols extracted
- 15447 symbol references tracked
- 0 active memories (0 core, 0 stale)
- Languages: typescript (398), javascript (5), python (1), ruby (1)
God Nodes (most-referenced symbols)
These are the symbols your codebase depends on most. Changes here have the largest blast radius.
- getLog — 757 references
- createLogger — 82 references
- sendMessage — 77 references
- classifyAndFormatError — 57 references
- execFileAsync — 55 references
- createWorkflowEvent — 42 references
- isValidCommandName — 42 references
- DiscordAdapter — 39 references
- WorkflowRun — 32 references
- parseAllowedUserIds — 29 references
Hub Files (highest PageRank)
Core architectural files — imported by many others.
packages/core/src/db/connection.ts(1.00)packages/core/src/db/adapters/postgres.ts(0.59)packages/core/src/db/adapters/sqlite.ts(0.59)packages/adapters/src/utils/message-splitting.ts(0.58)packages/cli/src/adapters/cli-adapter.ts(0.55)packages/core/src/types/index.ts(0.51)packages/paths/src/logger.ts(0.50)packages/providers/src/test/mocks/logger.ts(0.47)packages/core/src/test/mocks/logger.ts(0.43)packages/core/src/config/config-loader.ts(0.40)
Orphans
No obvious dead code — every named symbol has at least one reference.
Coupling (high-PageRank files)
packages/core/src/db/connection.ts(1.00)packages/core/src/db/adapters/postgres.ts(0.59)packages/core/src/db/adapters/sqlite.ts(0.59)packages/adapters/src/utils/message-splitting.ts(0.58)packages/cli/src/adapters/cli-adapter.ts(0.55)
Circular Dependencies (1 cycle)
- packages/providers/src/community/pi/registration.ts -> packages/providers/src/registry.ts -> packages/providers/src/community/pi/registration.ts
Security Issues (96 found)
Critical (12)
- Command injection risk —
packages/cli/src/commands/setup.ts:159 execSync(${checkCmd} ${command}, { stdio: 'ignore' });- Command injection risk —
packages/cli/src/commands/setup.ts:191 const resolved = execSync(${checkCmd} claude, {- API token —
packages/paths/src/strip-cwd-env.test.ts:130 process.env.CLAUDECODEOAUTH_TOKEN = 'sk-ant-oat01-secret';- API token —
packages/paths/src/strip-cwd-env.test.ts:134 expect(process.env.CLAUDECODEOAUTH_TOKEN).toBe('sk-ant-oat01-secret');- Hardcoded secret —
packages/cli/src/commands/setup.test.ts:165 claudeApiKey: 'sk-test-key',- Hardcoded secret —
packages/cli/src/commands/setup.test.ts:234 token: 'ghp_testtoken',- Hardcoded secret —
packages/cli/src/commands/setup.test.ts:263 idToken: 'id-token',- Hardcoded secret —
packages/cli/src/commands/setup.test.ts:264 accessToken: 'access-token',- Hardcoded secret —
packages/cli/src/commands/setup.test.ts:265 refreshToken: 'refresh-token',- Hardcoded secret —
packages/cli/src/commands/setup.test.ts:344 botToken: 'xoxb-test',- ...and 2 more
Low (84)
- Excessive console.log —
packages/cli/src/commands/workflow.ts:168 console.log(JSON.stringify(output, null, 2));- Excessive console.log —
packages/cli/src/commands/workflow.ts:172 console.log(Discovering workflows in: ${cwd});- Excessive console.log —
packages/cli/src/commands/workflow.ts:175 console.log('\nNo workflows found.');- Excessive console.log —
packages/cli/src/commands/workflow.ts:176 console.log('Workflows should be in .archon/workflows/ directory.');- Excessive console.log —
packages/cli/src/commands/workflow.ts:181 console.log(\nFound ${workflowEntries.length} workflow(s):\n);- Excessive console.log —
packages/cli/src/commands/workflow.ts:184 console.log(${workflow.name});- Excessive console.log —
packages/cli/src/commands/workflow.ts:185 console.log(${workflow.description});- Excessive console.log —
packages/cli/src/commands/workflow.ts:187 console.log(Provider: ${workflow.provider});- Excessive console.log —
packages/cli/src/commands/workflow.ts:189 console.log('');- Excessive console.log —
packages/cli/src/commands/workflow.ts:194 console.log(\n${errors.length} workflow(s) failed to load:\n);- ...and 74 more
Suggested Next Steps
- Before refactoring getLog, run
sverklo_impactto see the 757 call sites packages/core/src/db/connection.tsis your most-imported file — changes here cascade widely