Summary
Despite tsconfig.json enabling strict: true, any is used pervasively across core modules, negating most type-safety benefits.
Key Occurrences
| File |
Usage |
src/config/manager.ts |
validateConfig(config: any), configToSave as any |
src/agents/base.ts |
protected config: any |
src/agents/types.ts |
AgentConfig is { [key: string]: any } |
src/beads/memory.ts |
private db: any |
src/git/collector.ts |
private git: any, multiple casts |
src/pocketflow/workflow.ts |
private config: any |
src/llm/adapter.ts |
LLMConfig has [key: string]: any index signature |
Impact
- Runtime type errors are not caught at compile time
- IDE auto-complete and refactoring tools cannot reason about these values
Recommended Fix
- Type
db as Database from better-sqlite3
- Type
git as SimpleGit from simple-git
- Replace
AgentConfig placeholder with concrete per-agent config interfaces
- Remove the
[key: string]: any index signature from LLMConfig
Backlink: #1
Summary
Despite
tsconfig.jsonenablingstrict: true,anyis used pervasively across core modules, negating most type-safety benefits.Key Occurrences
src/config/manager.tsvalidateConfig(config: any),configToSaveasanysrc/agents/base.tsprotected config: anysrc/agents/types.tsAgentConfigis{ [key: string]: any }src/beads/memory.tsprivate db: anysrc/git/collector.tsprivate git: any, multiple castssrc/pocketflow/workflow.tsprivate config: anysrc/llm/adapter.tsLLMConfighas[key: string]: anyindex signatureImpact
Recommended Fix
dbasDatabasefrombetter-sqlite3gitasSimpleGitfromsimple-gitAgentConfigplaceholder with concrete per-agent config interfaces[key: string]: anyindex signature fromLLMConfigBacklink: #1