BrainOS

io.github.brainOS-HQ由 GitHub 帳號 brainOS-HQ 發布v0.11.2更新於 Nov 19, 2026

One memory for every AI tool: your AI picks up where you left off, with decisions and plans.

發布方自己的服務:BrainDog

概覽

AI 產生的概覽

本機 MCP 伺服器,為 AI 助理提供跨工作階段的持久專案記憶:追蹤實體、決策、計畫、阻礙與優先順序。

可以做什麼
  • 追蹤專案與事項:讀取與更新實體狀態、推進動能、阻礙與下一步,並判斷目前工作屬於哪個實體
  • 記錄、檢查、更新與回顧決策,包括行動前的衝突檢查與逾期回顧收件匣
  • 管理有序計畫:設定、追加、推進與讀取步驟,完成或略過需提供證據或理由
  • 檢索與稽核記憶:依語意搜尋、查看變更歷史、檢查記憶品質、辨識模式並給出聚焦建議
  • 唯讀掃描儲存庫狀態檔案與 Git 事實,並在高風險操作前評估風險或套用策略防護
  • 在預覽並取得使用者確認後,為專案建立 .brain 工作區
適用情境
適合橫跨多個工作階段或多個 AI 用戶端的長期工作,希望決策、阻礙與下一步能持續保留而不被反覆推翻。也適合希望以本機純文字檔案保存專案狀態的個人開發者或小型團隊。
執行需求
需要 Node.js 20 或更新版本,以本機 stdio 程序執行,通常透過 npx 啟動。不需帳號、雲端服務或資料庫。語意檢索為選用功能,需安裝 openai 套件並在伺服器環境設定 BRAIN_EMBEDDINGS 與 OPENAI_API_KEY;其餘工具不需此設定。初始化會在專案內寫入 .brain 目錄與代理指示檔案。
安裝前請注意
初始化會向專案寫入檔案,包括 AGENTS.md、CLAUDE.md 及各用戶端規則檔,但會先預覽且不覆寫既有指示檔。多個工具會寫入、取代或推進已存狀態,wrap_auto 會在無互動確認的情況下儲存變更。選用的語意檢索會把記憶文字傳送給 OpenAI 並產生小額費用;OPENAI_API_KEY 應放在 shell 環境中,不要貼進明文的 MCP 設定檔。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 BrainOS,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Brain OS: Forget your decisions? Brain OS remembers.]

[npm version] [MIT License] [MCP Compatible] [brainos-hq.com] [brainOS-HQ/brain-os MCP server]

One memory across your AI tools. Keep decisions, plans and next steps connected across ChatGPT, Claude, Cursor and other supported AI apps.

Brain OS

brainos-hq.com

Your AI remembers conversations. It still forgets project state.

Brain OS gives agents operational state: decisions, plans, blockers, and priorities that survive across sessions.

What is this?

AI agents are powerful inside a session, but long-running work has more state than any one chat: what you decided, what's blocked, what's active, and what should not be reopened. Brain OS gives agents operational state, not conversation logs:

  • Entities — track projects, deals, initiatives with status, momentum, blockers, and next moves
  • Decisions — log what was decided, why, what alternatives were rejected, and when to revisit
  • Patterns — detect recurring blockers, stale work, avoidance signals, and theme convergence
  • Focus — prioritize what to work on based on urgency, momentum, leverage, and staleness
  • Verified operational state — compare package/Git facts with claimed and desired state without changing anything
  • Semantic recall — search memory by meaning, not just ID

Brain OS is an MCP server that works with any MCP-compatible client: Claude Code, Cursor, Zed, GitHub Copilot, OpenAI Codex, Windsurf, or any agent that speaks the protocol.

What it looks like in use

Before the agent acts, it can check whether a proposed move conflicts with an existing decision:

> decision_check({ proposal: "switch to Postgres for the new service" })
{  "verdict": "conflict",  "conflicting_decision": {    "id": "dec_2026_03_14_db_choice",    "decision": "Use SQLite for all local-first projects",    "reason": "Lower ops burden, no infra to run, fits single-user scope",    "rejected_alternatives": ["Postgres", "DuckDB"],    "logged_at": "2026-03-14"  },  "guidance": "Re-litigating a settled choice. Surface the prior reasoning to the user before proceeding."}

That's the wedge: structured state with enforcement, so agents stop re-opening questions you already answered.

Quick start

Requires Node.js 20 or newer.

1. Connect the server

Claude Code:

bash
claude mcp add brain-os -- npx -y brain-os serve

Cursor (.cursor/mcp.json) and other MCP clients:

json
{  "mcpServers": {    "brain-os": {      "command": "npx",      "args": ["-y", "brain-os", "serve"]    }  }}

VS Code uses .vscode/mcp.json with a "servers" key and "type": "stdio" in place of "mcpServers".

2. Set up the project, from chat or from the terminal

From chat (no terminal): open your project and ask the agent:

Set up Brain OS in this project.

The agent calls brain_setup. It shows the folder and the exact files it would create, and writes nothing until you say yes. Your existing AGENTS.md / CLAUDE.md are never overwritten. If you already have your own AGENTS.md, the Brain OS rules go to .claude/brain-os/AGENTS.md, and the setup lists any of your files that need a one-line pointer to it. Nothing is written outside the project.

From the terminal:

bash
# In your projectnpx brain-os init

Either way, setup does three things:

  1. Creates a .brain/ directory with your entity, decision, and pattern stores.
  2. Installs slash commands into .claude/commands/ so you can run /brain, /brain:focus, /brain:decide, etc. directly in Claude Code. Bare aliases (/focus, /decide, etc.) install alongside them.
  3. Adds agent instructions so every MCP-compatible client behaves the same way. AGENTS.md is the canonical file. Thin pointer files cover Claude Code (CLAUDE.md), GitHub Copilot (.github/copilot-instructions.md), Cursor (.cursor/rules/brain-os.mdc), Zed (.zed/rules.md), and Windsurf (.windsurfrules).

Flags (brain_setup takes the same options as minimal / include_commands):

  • npx brain-os init --minimal: install only AGENTS.md + CLAUDE.md and skip the other client pointers (clean-repo mode)
  • npx brain-os init --no-commands: skip the slash commands (MCP server only)
  • npx brain-os init --no-agent-instructions: skip all agent-instructions pointer files

Check live operational state

Brain OS can independently read a small, explicit set of repository facts and show drift without updating memory or project state:

bash
npx brain-os reconcile --check .

The matching MCP tool, operational_state_check, observes only package.name, package.version, the current Git branch, and Git HEAD. Optional claimed state, desired state, and decision context are returned as separate layers: observations may be verified, stale, conflicting, unavailable, or different from a claim, but the checker never chooses a winner or applies a change.

The report is ephemeral JSON written to stdout. It creates no fact, evidence, issue, memory, entity, decision, plan, or audit record.

Configure semantic search (optional)

The semantic_recall tool needs an embeddings provider. Everything else (entity_update, decision_log, plan_*, etc.) works without one.

Brain OS does not install an embeddings SDK by default. This keeps the core install small and avoids pulling native ONNX/Sharp dependencies into users who do not need semantic search. Install the optional OpenAI provider beside brain-os, then add BRAIN_EMBEDDINGS to your MCP server env:

bash
npm install brain-os openai

Then configure the provider in your MCP server environment:

json
{  "brain-os": {    "command": "npx",    "args": ["-y", "brain-os", "serve"],    "env": {      "BRAIN_EMBEDDINGS": "openai",      "OPENAI_API_KEY": "${OPENAI_API_KEY}"    }  }}
ModeWhat it doesSetup
localTemporarily unavailable while the former provider carries unresolved High-severity transitive advisories.Use keyword recall or the OpenAI provider until an audited local backend ships.
openaiUses text-embedding-3-small via the OpenAI API. Faster than local. Costs ~$0.02 per million tokens.Install openai, set BRAIN_EMBEDDINGS=openai, then reference OPENAI_API_KEY from your shell environment.

If BRAIN_EMBEDDINGS is unset, the OpenAI provider is missing, or local mode is requested, semantic_recall returns a clear setup error. No silent provider install, model download, or API call occurs. Core tools continue working normally.

Never paste a raw sk-... key into your MCP config. ~/.claude.json and similar MCP config files are plaintext and easy to expose on screen or in backups. Instead, export the key once in your shell and reference it from the MCP process environment.

Tools

ToolDescription
entity_readRead operational state of one or all tracked entities
entity_updateUpdate entity state — status, momentum, blockers, next moves
decision_logLog a strategic decision with reasoning and alternatives
decision_checkCheck a proposed action against active decisions — returns clear/caution/conflict
decision_refreshRefresh an existing decision: bump review_date, append evidence, change status. Metadata only — does not mutate decision content.
decision_reviewReview-debt inbox: buckets overdue decisions (still-true / changed / archive / needs-evidence) and recommends an action for each. Read-only — proposes, you confirm. Auto-detects duplicate-stub decisions.
context_resolveResolve which entity the current work belongs to, from explicit mention / alias / files / lexical signals. Deterministic and confidence-scored — routes known context, never guesses intent.
focus_getGet prioritized recommendations on what to work on
project_evidence_scanRead-only scan of a repo's native operating state (STATE.md, FLAGS, HANDOFF, ROADMAP/PLAN/TODO, git activity, dirty files) for human gates, next moves, and do-not-touch — grounds focus in repo reality.
operational_state_checkEphemeral read-only comparison of allowlisted package/Git facts with optional claimed and desired state; reports evidence-backed drift/conflict without applying changes.
brain_setupSet up Brain OS in the open project from chat. Previews the folder and exact file plan, then writes only after the user confirms (single-use preview token). Never overwrites existing instruction files. Local stdio server only.
pattern_detectAnalyze patterns across all entities
memory_checkAudit memory quality — flags stale data, contradictions, noise
memory_commitEnd-of-session commit — save all state changes
semantic_recallSearch memory by meaning using natural language
audit_logRead the full mutation history — what changed, when, by whom
wrap_checkDetect whether meaningful state changes have accumulated since the last wrap
wrap_autoNon-interactive safety-net wrap: applies low-risk fields and stages high-risk changes for review
plan_setSet an ordered plan for an entity — step 1 becomes active next_move
plan_advanceComplete or skip a step (requires evidence/reason) — auto-promotes next
plan_addAdd steps to an existing plan
plan_readView plan progress and current step
risk_assessClassify risky actions before execution, including public-release and destructive-operation risks
action_guardApply built-in guard templates to common high-risk actions before proceeding

Slash commands

brain-os init installs slash commands into .claude/commands/ so the agent has a clear vocabulary for working with operational state. Each command installs in two forms: /brain:* (canonical, documented form) and a bare alias (/decide, /focus, etc.) for power-user brevity. /brain is the namespace root and installs once.

It also installs:

  • BRAIN_OS_PROTOCOL.md at .claude/brain-os/PROTOCOL.md (project) and ~/.claude/brain-os/PROTOCOL.md (user; written by npx brain-os init, or by brain_setup only with include_user_protocol=true). The protocol governs tool routing: when an agent runs a Brain OS slash command, it reads the protocol first, then calls entity_read/plan_read/focus_get/etc. as primary. Pulse files become fallback only.
  • brain-os-mode subagent at .claude/agents/brain-os-mode.md. When the main agent delegates Brain OS work to a subagent (e.g. Claude Code's Task tool), it picks up under the same protocol — no risk of subagents falling back to generic file search.
  • Optional routing-guard hook at templates/hooks/brain-os-routing-guard.py. Opt-in PreToolUse hook that warns if pulse files are read while a .brain/ workspace exists. Install instructions are printed by brain-os init.
CommandAliasWhat it does
/brain—Project scanner: overview of all entities, freshness, decisions, alerts
/brain:focus/focus"What should I work on today, and why?" with evidence
/brain:decide/decideCapture a strategic decision (with conflict check before logging)
/brain:strategy/strategyStrategic thinking partner: think a decision through before building
/brain:wrap/wrapSession wrap: update entity state, capture decisions, detect momentum shifts
/brain:patterns/patternsDetect patterns across entities: recurring blockers, avoidance, themes
/brain:retro/retroWeekly or monthly retrospective: what shipped, what stalled, what's hidden
/brain:graph/graphShow how entities connect, leverage opportunities, shared decisions

Idempotent install

Re-running init is safe and repair-aware: existing Brain OS commands are preserved, and any missing form is installed. If a command path is taken by another tool, that path is skipped and reported — your file is never overwritten. You can install Brain OS into a project with existing /decide or /focus commands and the namespaced /brain:* forms will still land.

How it works

Brain OS stores everything as local JSON files in a .brain/ directory:

.brain/  entities/     — one file per tracked entity  decisions/    — decision log  patterns/     — detected patterns  config.json   — workspace settings

No cloud. No database. No account. Your data stays on your machine.

Why no UI?

The interface is the agent. Brain OS is read and written through MCP tool calls — /brain, /focus, /decide, decision_check, etc. — surfaced inline by whichever client you use (Claude Code, Cursor, etc.). There's no separate dashboard to keep open, no second tab to context-switch into, no UI state that can drift from the underlying files.

This is a design choice, not a missing feature. Brain OS state lives at the same level as your code; the agent is already there, already in the conversation, already the right surface to ask "what's the priority right now?" Adding a human dashboard would split attention between two interfaces for the same data.

If you want a visual at-a-glance view, .brain/ is plain JSON — render it however you want. The public MCP server stays agent-native by design.

Teams & sync

Brain OS is single-user by design today. But because .brain/ is just local JSON files, teams can share a brain through any synced filesystem — no product changes needed:

ApproachProsCons
Git — commit .brain/ to the repoDiff/merge tools, version history, intentional sync pointsManual git pull; merge conflicts on simultaneous edits
Dropbox / Drive shared folderReal-time-ish, no manual stepsConcurrent writes can create conflict files; embeddings.json rewrites often
NFS / SMB / S3 mountTruly real-timeRequires infrastructure setup

This works without any built-in sync because every Brain OS tool call reads fresh from disk — there's no in-memory cache to invalidate. Whatever your filesystem syncs, the next tool call sees. Same applies cross-tool: log a decision from Claude Code on Monday, open Cursor on Tuesday — same brain, both agents.

Native encrypted team sync with proper merge semantics is on the roadmap. The local-first foundation today is what makes that federation additive, not a retrofit.

Auto-loaded status

When an MCP client connects, Brain OS exposes a brain://status resource with an operational overview — active entities, alerts, top priority, and recent decisions. The agent starts every session with context, not amnesia.

Testing

Brain OS ships a smoke test suite at tests/smoke.mjs, wired to npm test and run on every push by .github/workflows/audit.yml. Run locally:

bash
npm test

Current coverage (regression + happy-path):

  • decision_log — type-collision no-supersede, explicit supersedes works, cross-entity supersession rejected
  • decision_check — keyword-only flag stays caution without embeddings (no false STOPs), asymmetric semantic comparison (rejected vs chosen facet)
  • decision_refresh — clears dangling superseded_by when status transitions away from superseded
  • plan_advance — no over-promotion when an active step already exists
  • entity_update — apply diff and record changes, create missing entity, mode_reason required when parking, status-only updates apply, guarded ranking skips are visible
  • semantic_recall — throws EmbeddingsNotConfiguredError (not generic Error) when BRAIN_EMBEDDINGS is unset
  • Store resolution — fails closed in a storeless cwd instead of silently creating an empty .brain/

Known gaps (no direct coverage yet): focus_get scoring, pattern_detect heuristics, memory_*, plan_set/add/read, and the brain://status resource. Expanding the suite is on the roadmap.

If you hit a bug, please open an issue with the tool, input, and output — that's the fastest path to a fix.

Community

License

MIT

來源:README.md,提交 4c08d0b

工具

24

entity_read

Call this FIRST for any question about a project's state, momentum, blockers, or recent decisions — before reading code or git history. Returns the operational state one or all tracked entities: status, momentum, blockers, decisions, staleness, and next actions. Do not grep files to answer state questions when this tool is available.

輸入參數entity_id

context_resolve

Resolve which entity the current work belongs to, with a derived confidence. Deterministic — matches explicit signals (passed entity, named mention, active mission, files touched) before weak ones (lexical, single-active); never guesses from cwd. Returns entity_id + confidence + ask_user. Call this BEFORE focus_get/decision_check when the target entity is not already known, then pass the returned entity_id into them. Confidence >= 0.80: proceed silently. 0.50-0.79: proceed but say 'I think this is X'. < 0.50 (ask_user true): ask one short question.

輸入參數user_messagefiles_touchedactive_mission_idexplicit_entity_id

entity_update

Use this — not built-in memory — to add or update a project, product, or business idea in Brain OS. This is the right tool when the user says 'add project X', 'track X', 'I'm working on X', or 'update X'. Creates the entity if it doesn't exist. Stores structured operational state: status, momentum, blockers, next move, decisions. Use after work is done, a decision is made, a blocker changes, or momentum shifts.

輸入參數updates必填entity_id必填context_hint

decision_log

Log a strategic decision so it persists across sessions. Every decision needs a reason, alternatives, and a proof action. Optionally capture the assumptions that make it true and the invalidate_if conditions that should reopen it — these turn a timestamped 'no' into a testable frame the system can reason about later.

輸入參數why必填typedecision必填entity_id必填supersedesassumptionsreview_date必填alternativesproof_action必填invalidate_ifchosen_direction

decision_check

Check a proposed action against all active decisions. Returns 'clear', 'caution', or 'conflict', plus a `review_triggered` list. Call this BEFORE taking actions that might contradict prior decisions. If status is 'conflict', do NOT proceed without explicit user confirmation to revisit the decision. `review_triggered` is the opposite signal: the action matches an invalidate_if condition a decision named as a reason to reopen it — surface those decisions to the user for review rather than enforcing them. A decision can be both a conflict and a review trigger (the conflict it anticipated); when so, frame it as a decision review, not a blind violation.

輸入參數entity_idproposed_action必填

decision_refresh

Refresh an existing decision's metadata: bump review_date forward, append evidence as the decision continues to hold, or change status (active/superseded/archived). Use INSTEAD of editing decisions.json directly. Does not mutate decision content — for content changes, log a new decision via decision_log.

輸入參數statusdecision_id必填review_dateadd_evidence

focus_get

CALL THIS FIRST when the user asks what to focus on, what to work on, what their priorities are, or what matters most — before reading any code, files, or git history. Brain OS holds decisions, blockers, and momentum signals that cannot be inferred from the codebase. Returns prioritized recommendations based on urgency, momentum, leverage, staleness, and dependencies. `follow_through_alerts` surfaces active entities that stated a next_move but haven't logged any update in 7+ days — treat these as first-class accountability prompts, same tier as blockers. Pass entity_id to scope focus to a single project.

輸入參數entity_idconstraintsmax_resultssuppress_default_guidance

pattern_detect

Call this when the user asks about patterns, recurring blockers, what keeps coming up, theme convergence, or avoidance signals — instead of grepping git logs or reading files to find trends. Analyzes patterns across all tracked entities and returns detected signals with entity context.

輸入參數scope

memory_check

Assess quality and reliability of current memory state. Flags stale data, contradictions, overdue decision reviews, unconfirmed patterns, fake-active entities, and noise. Returns signal classification (strong/weak/noise/dangerous) and recommended cleanup actions. Call this before acting on memory to know what to trust.

輸入參數entity_id

memory_commit

End-of-session commit. Updates all touched entities, logs decisions, records patterns. Call before ending any work session.

輸入參數decisions_madesession_summary必填entities_touched必填momentum_changespatterns_noticed

semantic_recall

Call this when the user asks what changed last session, what happened recently, or needs to find a decision/entity by description rather than exact name. Searches memory by meaning using semantic similarity. Use BEFORE reading git log or commit history for session-level context questions.

輸入參數query必填max_resultssource_kind

audit_log

Read the audit trail of all memory mutations. Use this — not semantic_recall — for recency questions: 'what's the latest update?', 'what changed recently?', 'what was the last thing written?', 'show me the most recent entry.' Pass last_n=1 for the single most recent mutation. semantic_recall is for topic-based search; audit_log is for time-ordered history, integrity checks, and debugging unexpected state.

輸入參數toollast_nentity_id

wrap_check

Check how much state-changing work has accumulated since the last wrap. Read-only — never mutates. Tier 1 of auto-wrap: call this when the user signals they are wrapping up or ending a session, or periodically during a long session, to decide whether to proactively offer a /wrap before context is lost to compaction or session end. Returns unwrapped_count, the projects touched, and recommend_wrap. When recommend_wrap is true, offer to wrap; do not auto-wrap silently from this tool.

輸入參數thresholdsession_id

wrap_auto

Tier 2 of auto-wrap: persist a session wrap WITHOUT interactive review, when context is about to be lost (compaction, session end) or the user declined to review. Use the normal interactive /wrap when the user is present and reviewing — only reach for this as a safety net. The agent supplies the synthesized wrap; this tool applies LOW-RISK fields (next_move, open_questions, evidence_of_progress) immediately and STAGES high-risk changes (status, mode, blocked, decisions) as an unconfirmed record for /start to surface and the user to confirm. Always logs a session_wrapped marker. Never put a status change or a decision in pending_review expecting it to take effect now — staged items are proposals, not writes.

輸入參數summary必填triggerentity_id必填next_movesession_idopen_questionspending_reviewevidence_of_progress

plan_set

Set an ordered plan for an entity. Replaces any existing plan. Step 1 becomes the active next_move. Use when committing to a sequence of work — not for brainstorming. Each step should be a concrete, completable action.

輸入參數steps必填entity_id必填

plan_advance

Complete or skip the current plan step. Requires evidence (for complete) or reason (for skip). Automatically promotes the next pending step to active and updates next_move. Enforces continuity — you cannot skip without explaining why.

輸入參數action必填reasonstep_id必填evidenceentity_id必填

plan_add

Add steps to an existing plan. Use when new work is discovered mid-plan. Steps can be added at the end or immediately after the current active step.

輸入參數steps必填positionentity_id必填

plan_read

Read the current plan for an entity. Shows all steps, their status, the active step, and overall progress.

輸入參數entity_id必填

project_evidence_scan

Read-only scan of a repo's native operating state (STATE.md, FLAGS*, HANDOFF*, ROADMAP.md, PLAN*.md, TODO.md, AGENTS.md + recent git activity / dirty files). Returns evidence — human gates, blockers, next moves, do-not-touch, safe parallel work — surfaced as exact lines. Call AFTER context_resolve and BEFORE building a focus answer. Mutates nothing and does no inference: it returns ALL candidate signals; deciding the focus is the agent's job. This is NOT context_resolve — do not use it to pick which project you're in. TRUST: root_path must be a folder you trust (your own project, or a repository you cloned). Git runs inside it and reads that folder's own Git config; known ways for such a config to run a program are blocked, but that list is not guaranteed complete. Do not scan a folder that was unpacked from an archive or shared by someone you do not trust.

輸入參數entity_idroot_path必填

operational_state_check

Read-only Verified Operational State checker. Independently derives an allowlisted set of live repository facts (package name/version and Git branch/HEAD), compares them with optional claimed and desired state, and reports verified/drift/stale/conflict/unavailable results with evidence pointers. Decision context remains visibly separate human judgment. Ephemeral: writes no Brain OS, repository, issue, memory, decision, plan, evidence, version, or audit record. TRUST: root_path must be a folder you trust (your own project, or a repository you cloned). Git runs inside it and reads that folder's own Git config; known ways for such a config to run a program are blocked, but that list is not guaranteed complete.

輸入參數claimsroot_path必填desired_statedecision_context

decision_review

Call this before making new decisions, at session end, or when the user asks if a decision is still valid or what's overdue. Review-debt inbox: buckets overdue decisions into still_true / changed / archive / needs_evidence with a recommended action for each. READ-ONLY — proposes and cites reasons but mutates nothing; confirm, then apply via decision_refresh / decision_log. Auto-detects duplicate stubs. When root_path is provided, matches each decision's invalidate_if conditions against repo scan output. TRUST: root_path, when given, must be a folder you trust (your own project, or a repository you cloned). Git runs inside it and reads that folder's own Git config; known ways for such a config to run a program are blocked, but that list is not guaranteed complete.

輸入參數limitentity_idroot_pathinclude_parked

risk_assess

Assess the risk of a proposed action before executing it. Matches the action against a fixed list of risk rules: private→public boundary crossings, destructive operations (deleting files, branches, rows or resources; discarding changes), release/publish actions, external communication, and security-sensitive file access. Call this BEFORE any action in the trigger set: publish, push, force-push, git tag, deploy, delete or overwrite files or data, external API writes, roadmap/private state movement. Returns risk_level (low/medium/high/critical, or not_assessed), boundary_crossed, reversibility, and risk_reasons. risk_level 'not_assessed' means no rule matched: it is NOT a safety verdict, so do not treat it as approval. Pass the result to action_guard to get a policy decision (allow/ask/block/not_assessed).

輸入參數diffentity_idgit_statuspackage_infofiles_touchedproposed_action必填target_visibility

action_guard

Apply the Brain OS policy table to a risk assessment. Takes the output of risk_assess plus the concrete action type and returns a policy decision: allow (proceed), ask (stop and get explicit user confirmation), block (do not proceed), or not_assessed (no rule covered the action: Brain OS has no opinion, which is not approval; fall back to your own judgment and your host's confirmation rules). Pure TypeScript — no LLM call. Policies in order: private_to_public → block; critical risk → block; force-push → ask; npm publish → ask; security boundary → ask; irreversible → ask; high risk → ask; hard-to-reverse external → ask; medium + requires_confirmation → ask; not assessed → not_assessed; else → allow. Always audit what was decided and why.

輸入參數entity_idassessment必填action_type必填

brain_setup

Set up Brain OS in a project folder when no store exists yet (tools return 'No Brain OS store found'). Two steps, never skip the first: (1) call with no confirm — returns the proposed folder, a question for the user, and the exact files that would be created, refreshed, or preserved; nothing is written. It also returns a single-use preview_token. (2) Only after the user explicitly says yes, call again with confirm=true, the same target_dir and options, and that preview_token; writes without a matching token are refused. Existing instruction files are never overwritten; any that need a Brain OS line are listed in plan.needsIntegration — tell the user. Writes nothing outside the project unless include_user_protocol=true. If a store already exists, it reports that and does nothing.

輸入參數confirmminimaltarget_dirpreview_tokeninclude_commandsinclude_user_protocol

版本歷史

1
  1. v0.11.2最新Nov 17, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Brain 整合