AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻译准备中
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Bock is a feature-declarative, target-agnostic programming language
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
A feature-declarative programming language. Compiles to JavaScript, TypeScript, Python, Rust, and Go. No runtime to ship.查看完整 README ↗
A feature-declarative programming language. Compiles to JavaScript, TypeScript, Python, Rust, and Go. No runtime to ship.
A function in Bock declares what it does, what types it operates on, what
effects it has, and what guarantees it requires. Annotations and
signatures carry the intent; the body carries the work. The compiler
resolves the rest. A function annotated @concurrent becomes
Promise.all in JavaScript, tokio::join! in Rust, and goroutines in Go.
An effect declared with with Log becomes a structured logger parameter
in every target. The same source describes the program. The compiler
describes how each target should run it.
Most cross-platform languages add a runtime: a virtual machine, a
translation layer, a library your program depends on at execution time.
Bock does not. The output of a bock build is plain code in the target
language, ready to drop into your existing project. Run it on Node, ship
it as a Python package, link it into a Rust binary, deploy it as a Go
service. The Bock runtime supports development; it does not ship.
Bock is at v1.0 and under active development. The compiler pipeline runs
end to end: the CLI (bock) scaffolds, checks, builds, runs, tests, and
formats projects; the interpreter executes source directly for fast
iteration; codegen emits all five targets as per-module native source
trees; the v1 standard library (11 core modules) executes across every
target; and the website and VS Code extension build from this repo. The
work in flight is codegen polish for real-world programs: a focused
conformance suite passes on all five targets, while the broader example
programs are being hardened target by target (tracked in
STATUS.md and ROADMAP.md).
AI participates in compilation, not at your program's runtime. The
pipeline is deterministic from parsing through type checking, ownership
analysis, effect tracking, and target lowering; an [ai] block in
bock.project is the opt-in seam where the compiler may consult an AI
model at capability gaps, with deterministic fallback and pinned replay
in production builds. This path is configured but not yet exercised in
real-world usage; Bock uses rule-based code generation by default.
Additional codegen targets (Java, C++, C#, Swift) are roadmap candidates
for after v1, not v1 commitments.
A function declares its effects in the signature. Here prepare says it
uses Logger; the handler is injected at the call site rather than
imported as a global. The body is a pipeline.
module main
public record Document {
text: String
quality: Float
}
public effect Logger {
fn log(message: String) -> Void
}
public fn normalize(doc: Document) -> Document {
Document { text: doc.text.trim().to_lower(), quality: doc.quality }
}
public fn keep_quality(docs: List[Document]) -> List[Document] {
docs.filter((d) => d.quality > 0.5)
}
public fn prepare(docs: List[Document]) -> List[Document] with Logger {
log("preparing ${docs.length()} documents")
docs
|> keep_quality
|> ((ds) => ds.map(normalize))
}
Bock ships as a single binary. Install with Cargo, or download a pre-built binary from GitHub Releases.
cargo install bock
bock --version
Scaffold a project, then check, build, and run it:
bock new hello
cd hello
bock check # type-check, lint, validate context
bock run # execute via the interpreter (no codegen)
bock build --target js # emit JavaScript into build/js/
bock build --target go # emit Go into build/go/
bock new generates bock.project (TOML), a src/main.bock entry
point, a tests/ directory, and a .gitignore. The bock.project
includes a commented-out [ai] block; AI-assisted generation is opt-in.
The compiled output runs on its target with nothing from Bock imported at
runtime: node build/js/main.js prints the program's output directly.
The full walkthrough is at bocklang.org/get-started.
| Path | Contents |
|---|---|
compiler/ | The compiler, a Cargo workspace of bock-* crates plus the bock CLI, and the conformance suite. |
spec/ | The language specification (spec/bock-spec.md) and its dated changelogs. |
stdlib/ | The Bock standard library (core.* modules), shipped as source. |
extensions/vscode/ | The VS Code extension, with vocabulary synced from the compiler. |
examples/ | Example Bock projects, from fundamentals to real-world shapes. |
docs/ | The mdBook documentation source. |
website/ | The bocklang.org marketing site (Astro). |
branding/ | Brand assets. Most content is gitignored; branding/assets/logo/ is committed for contributor access. |
docs/spec/bock-spec.mdARCHITECTURE.mdROADMAP.md, STATUS.mdBock is at v1.0 and contributions of every size are welcome. Start with
CONTRIBUTING.md for local setup and the workflow, and
ARCHITECTURE.md for a tour of the compiler pipeline.
Participation is governed by the Code of Conduct.
Bock is open source under the MIT License.