Show HN:Foundation,一种软件与人工智能的新方法
Show HN: Foundation, a different approach to software and AI

原始链接: https://github.com/nmxmxh/foundation

Ovasabi Foundation 是一个高性能、事件驱动的底层架构,专为构建宏大且长期演进生产系统的团队而设计。它并非一个“无代码”平台,而是为那些重视架构纪律和硬件效率的开发者提供的一套严谨工具集。 **核心能力:** * **性能层级:** 运行于七个“平面”之上,从纳秒级的直接调度到微秒级的 JSON 兼容性,并具有防止性能回归的自动化强制机制。 * **集成基础设施:** 具备租户隔离的事件溯源(Event Sourcing)、用于亚微秒级操作读取的“Hermes”热平面(Hotplane)、弹性的工作节点编排以及基于 OpenTelemetry 的统一可观测性。 * **混合技术栈:** 结合了 Go(后端)、Rust/WASM(高性能内核)和 TypeScript(前端/传输层),旨在弥合硬件能力与软件执行之间的鸿沟。 **设计理念:** 该架构强制实现关注点分离,利用 Protobuf/Cap’n Proto 进行契约管理,并通过清晰的包边界来保障可维护性。它要求执行严格的开发实践——如关联 ID 追踪(Correlation-ID tracking)和断路器机制——以确保系统能够可靠地扩展。 Ovasabi Foundation 专为拥抱托管基础设施的团队打造,将代码库的演进转变为一个可控、可验证的过程。它适用于那些愿意接受严苛要求,以构建对性能、可追溯性和架构完整性有极高要求的系统的人们。

一篇近期发布在“Show HN”上、介绍名为 *Foundation* 项目的帖子引发了 Hacker News 社区的批评。该项目声称提出了一种软件与人工智能开发的新方法。 开发者 MomohNobert 分享了该项目的 GitHub 仓库,但初始反馈并不理想。一位名为 `serious_angel` 的用户反馈称,在尝试使用该工具时立即遇到了 YAML 解析错误,并批评该项目是“令人悲哀且毫无诚意的粗制滥造”。 对此,开发者道歉并承诺修复该问题,同时引导感兴趣的用户查阅项目文档和性能基准测试,以进一步了解其底层架构。另一位评论者则以轻松的口吻引用了阿西莫夫《基地》(*Foundation*)系列中的典故,提及了哈里·谢顿(Hari Seldon)和“骡”(the Mule),以此呼应项目名称。
相关文章

原文

A full-stack application substrate for high-performance, event-driven systems.

Ovasabi Foundation is an integrated toolkit for teams that want to evolve code. It provides the platform modules, scaffolds, enforcement checks, and documentation to bootstrap and maintain production systems with:

  • Tenant-isolated, event-driven architecture — every operation carries metadata: who asked, what organization, correlation ID
  • Performance ladder — seven planes from nanosecond direct dispatch to microsecond JSON compatibility
  • Hermes hotplane — bounded, node-local projections for sub-microsecond operational reads
  • Worker orchestration — bounded background processing with retry policies and progress tracking
  • Built-in observability — logs, metrics, and traces automatically linked by correlation ID

Not a no-code platform. Not zero-DevOps. Not for teams that want to move fast by cutting corners. Foundation is for teams that embrace managed infrastructure, understand performance, and expect their codebase to evolve.


Component Tech Stack Purpose
server-kit Go Backend: event bus, workers, Hermes, database, resilience, observability
runtime-transport TypeScript Client wire: command bus, envelope creation, metadata stores, WebSocket/HTTP fallback
runtime-sdk Rust/WASM High-performance kernel: 4KB control buffer, zero-copy communication
ui-minimal TypeScript/React Shared UI primitives, semantic theme tokens, motion helpers
frontend-kit TypeScript IndexedDB storage, metadata helpers, runtime adapters, transfer progress
runtime-native Tauri/Rust Native shell bridge: secure storage, GPU handles, device access
config-contracts Go/TypeScript Cross-language configuration schemas

Data Layer: PostgreSQL (durable truth), Redis (coordination), Protocol Buffers (contracts), Cap'n Proto (zero-copy boundaries)


Foundation uses seven performance planes. Each plane has its cost measured and enforced:

1. Direct dispatch        10–30 ns/op     (same-process, zero-alloc)
2. Binary frames          20–80 ns/op     (borrowed views)
3. Generated protobuf     ~370 ns/op      (typed cross-process)
4. gRPC                   20–30 µs/op     (network machinery)
5. JSON                   ~30 µs/op       (compatibility)
6. Native FFI/SHM         (varies)        (trusted compute)
7. Browser + WASM + SAB   (platform)      (where supported)

Key rule: The fastest lane must not pay the cost of the compatibility lane. This is measured automatically; regressions are caught before they land.

Read more: docs/foundation_benchmarks.md


Every project generated from Foundation receives:

  1. Multi-Tenant Isolation — organization scope derived from authenticated context, never from client data
  2. Event-Driven Nervous System — canonical requested → success / failed lifecycle with correlation metadata
  3. Hermes Hotplane — node-local, memory-bounded, indexed read models that project database mutations in real-time
  4. Resumable File Transfers — progress-bearing, chunk-based upload/download with resumability
  5. Bounded Worker Processing — background jobs with exponential backoff, retry policies, and bounded queues
  6. Unified Observability — OpenTelemetry tracing, structured logs, circuit breakers, error taxonomy

Start here → docs/foundation_quick_start.md (15 min) → docs/foundation_tour.md (walk-through) → docs/foundation_architecture_contract.md (platform/project split)

For Architects & Reviewers

Start here → docs/PHILOSOPHY.md (why Foundation exists) → docs/foundation_architecture_contract.mddocs/foundation_nervous_system.mddocs/practice_controls.md

For AI Agents & Partners (Agent-Native Workflow)

Start here → AGENTS.mddocs/foundation_glossary.mddocs/agent_operating_contract.mddocs/ai_threat_model.md


Path Purpose
server-kit/ Go backend: registry, metadata, events, workers, resilience, observability, Hermes, eventlog, Redis, database, transfer, projection gateway, object storage, bulk operations, intelligence signals
runtime-transport/ Protocol contracts, command bus, route registry, binary codecs, Hermes projection schemas
runtime-sdk/ WASM/Rust/Go kernel, 4KB control-buffer, shared arena, runtime lane helpers
runtime-native/ Tauri shell, secure storage, native frames, device dispatch
frontend-kit/ IndexedDB storage, metadata, runtime artifacts, transfer progress
ui-minimal/ Shared UI primitives, theme tokens, motion helpers
config-contracts/ Generated configuration schemas
templates/ Scaffold templates copied into generated projects
docs/ Architecture, practices, guides, security, performance, testing
tooling/ Enforcement scripts, manifests, lint configs

make generate-contracts      # Code gen (Protos → Go/TS)
make lint                    # All linters
make test                    # All tests
make check-rust              # Rust fmt, clippy, tests
make verify                  # Full CI suite
make check-practice-controls # Practice matrix
make check-doc-references    # Link validation

make docker-up               # Start local infra
make test-service-backed     # Tests with live DB/Redis

From the parent directory of foundation:

# New project
node foundation/cmd/ovasabi/bin/ovasabi.js init --profile=performance --name=my-app --foundation-dir foundation --skip-license

# Or via shell script (legacy)
./foundation/scripts/init-project.sh my-app full

# Update existing project
node foundation/cmd/ovasabi/bin/ovasabi.js update --project-dir=/path/to/project --foundation-dir foundation --skip-license

Generated projects consume Foundation through package boundaries. Do not import raw foundation/*/ts/src or foundation/*/go directly.


Foundation bridges the software deficit: the gap between hardware performance (nanoseconds) and typical software stacks (milliseconds). It provides proven patterns for:

  • Responding instantly — sub-microsecond operational reads via Hermes
  • Scaling safely — bounded work, tenant isolation, circuit breakers
  • Observing clearly — correlation IDs flowing through all layers
  • Evolving confidently — enforced practices, contract verification, performance measurement

Foundation is not for everyone. It's demanding. It requires discipline: thinking about performance trade-offs, writing adequate tests, understanding failure modes, reviewing gate verdicts. It's for teams that expect to build something ambitious.

Read docs/PHILOSOPHY.md for the full story.


Start here: docs/README.md is the documentation map.

Key reads (in order):

  1. docs/foundation_glossary.md — concept lookup
  2. docs/foundation_quick_start.md — 15-minute path
  3. docs/foundation_tour.md — walk-through one action
  4. docs/foundation_architecture_contract.md — ownership split
  5. docs/foundation_nervous_system.md — lifecycle contract

If you're using AI tools: AGENTS.md — agent workflows and evidence requirements

To understand why: docs/PHILOSOPHY.md — the motivation and design principles


Foundation is actively evolving. The entire repository represents a work-in-progress baseline for production applications. Expect:

  • Continued refinement of contracts and practices
  • New performance planes (GPU compute, distributed tracing refinement)
  • Agentic coding patterns still being proven
  • Documentation expanding as usage patterns emerge

Contributions via research, agents, and human reviewers are how Foundation improves. Read docs/agent_operating_contract.md for evidence and handoff expectations.


See LICENSE.

联系我们 contact @ memedata.com