@arc-forge/ai-context-builder
v1.0.0
Published
FORGE AI Context Builder (P02) — build optimized context packages that maximize AI understanding while enforcing token budgets.
Maintainers
Readme
FORGE AI Context Builder (P02) — @arc-forge/ai-context-builder
Build optimized context packages that maximize AI understanding while enforcing token budgets — deterministically, offline, at zero AI inference cost.
Installation
npm install @arc-forge/ai-context-builderCLI Usage
npx contextc "raw context..." --goal "API Design" --max-tokens 500Programmatic API
import { buildContext } from '@arc-forge/ai-context-builder';
const result = buildContext({
rawContext: `Must implement strict authorization checks on all endpoint handlers.
Decided to use standard JWT tokens passed in Authorization Bearer headers.`,
goal: 'Secure API design',
audience: 'Backend Engineers'
}, {
compress: true,
maxTokens: 500
});
console.log(result.prompt);
console.log(result.budgetVerdict);Features
- Rule-based content relevance filtering & classification
- Meaning-preserving content compression
- Deterministic content prioritization
- Context Budget guardrails
- Zero AI inference costs ($0)
