Summary
Numerous hard-coded values scattered throughout the codebase make configuration and tuning difficult.
Source
Code Reviewer Assessment
Locations
impl/mvp/src/holons/root.ts:427-428 - ESTIMATED_TOKENS_PER_AGENT_CALL = 5000
impl/mvp/src/holons/root.ts:429 - CONFIDENCE_THRESHOLD = 0.6
impl/mvp/src/holons/root.ts:441 - retry calculations
impl/mvp/src/config.ts:87,90,163-165 - model defaults, URLs
impl/mvp/src/holons/adk/runner.ts:199 - DEFAULT_AGENT_TIMEOUT_MS = 120_000
Examples
// Scattered throughout root.ts
const BUDGET_TOKENS = task.constraints.budget.tokens;
const ESTIMATED_TOKENS_PER_AGENT_CALL = 5000;
const CONFIDENCE_THRESHOLD = 0.6;
Impact
- Hard to tune system behavior
- Values not documented
- Different environments need different values
- Testing requires code changes
Severity
Medium | Likelihood: High (affects every deployment)
Recommended Fix
Create dedicated constants file and config schema:
// src/constants.ts
export const LLM_CONSTANTS = {
CONFIDENCE_THRESHOLD: 0.6,
TOKENS_PER_AGENT_CALL_ESTIMATE: 5000,
DEFAULT_TIMEOUT_MS: 120_000,
MAX_SUBTASKS: 50,
MAX_CRITERIA: 20,
} as const;
// Or add to config schema
const HolonConfigSchema = z.object({
confidenceThreshold: z.number().min(0).max(1).default(0.6),
tokensPerAgentEstimate: z.number().int().default(5000),
agentTimeoutMs: z.number().int().default(120_000),
});
Generated by HCA Architecture Assessment
Summary
Numerous hard-coded values scattered throughout the codebase make configuration and tuning difficult.
Source
Code Reviewer Assessment
Locations
impl/mvp/src/holons/root.ts:427-428-ESTIMATED_TOKENS_PER_AGENT_CALL = 5000impl/mvp/src/holons/root.ts:429-CONFIDENCE_THRESHOLD = 0.6impl/mvp/src/holons/root.ts:441- retry calculationsimpl/mvp/src/config.ts:87,90,163-165- model defaults, URLsimpl/mvp/src/holons/adk/runner.ts:199-DEFAULT_AGENT_TIMEOUT_MS = 120_000Examples
Impact
Severity
Medium | Likelihood: High (affects every deployment)
Recommended Fix
Create dedicated constants file and config schema:
Generated by HCA Architecture Assessment