How ai-swiss/base works
BASE is a framework and reference implementation for expressing a human-approved working method in portable, editable files, then using that method to guide AI tools. The central workflow is to structure and review the method, inventory its resources, route a request to relevant guidance, and provide the assistant with an appropriately bounded context. The graph also preserves documented integrations, the Studio, diagnostics, and evaluation. Some subsystems are represented by directory paths because their source was not sampled; their internal links are omitted where evidence is unavailable.
Main entry points: base-core.mjs BASE core broker · orchestrate.mjs Evaluation orchestration · route-service.mjs Route computation · init.mjs Initialize project
Components 24
Method and resources
- Method files
- Initialize project
tools/cli/init.mjs - Resource metadata
tools/core/frontmatter.mjs
Core execution
- Resource inventory
tools/base-core.mjs - Access and egress
tools/core/egress.mjs - Context packing
tools/core/context-pack.mjs - Resource ranking
tools/core/rankers.mjs - Route decision
tools/core/routing.mjs - Route computation
tools/core/route-service.mjs - BASE core broker
tools/base-core.mjs - Local index
packages/base-index-local/src/route.mjs - Semantic ranker
packages/base-ranker-semantic/src/ranker.mjs
User and tool interfaces
- MCP server
mcp/src/index.ts - Core adapter
mcp/src/base-core-adapter.ts - Studio interface
tools/studio/ui/src/App.tsx - Studio server
tools/studio/server.mjs - Documentation site
packages/base-docs-site/src/lib/content.ts
Diagnostics and evaluation
- Corpus diagnosis
tools/doctor/diagnose.mjs - Evaluation orchestration
tools/eval/orchestrate.mjs - Process harness
tools/eval/broker-harness.mjs - Evaluation and models
packages/base-eval - LLM adapters
packages/base-llm
Other components
- Method author
- AI tool
Connections 21
- Method author → Method files: defines and approves
README.md - Method author → Initialize project: requests setup
README.md - Initialize project → BASE core broker: initializes
tools/cli/init.mjs - Method files → AI tool: provides method
README.md - BASE core broker → Resource metadata: parses metadata
tools/base-core.mjs - BASE core broker → Access and egress: checks egress
tools/base-core.mjs - BASE core broker → Context packing: packs context
tools/base-core.mjs - Route computation → Resource ranking: scores candidates
tools/core/route-service.mjs - Route computation → Route decision: decides route
tools/core/route-service.mjs - BASE core broker → Route computation: orchestrates routing
tools/base-core.mjs - MCP server → Core adapter: delegates to
mcp/src/index.ts - Core adapter → BASE core broker: brokers requests
- AI tool → MCP server: uses integration
README.md - Studio interface → Studio server: uses API
- Studio server → BASE core broker: serves BASE operations
- Corpus diagnosis → BASE core broker: loads inventory
tools/doctor/diagnose.mjs - Evaluation orchestration → Evaluation and models: runs experiment
tools/eval/orchestrate.mjs - Evaluation orchestration → Process harness: builds harness
tools/eval/orchestrate.mjs - Evaluation orchestration → LLM adapters: creates model clients
tools/eval/orchestrate.mjs - Local index → Semantic ranker: supports local routing
- Method author → Documentation site: browses guidance