astrale-domain

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Astrale Domain

Astrale Domain

Load detailed domain knowledge from the references that matches the goal.
从与目标匹配的参考文档中加载详细的Domain知识。

Kernel-v2 boundary

Kernel-v2 边界

  • Domain repositories and product-Domain packages do not contain
    .spec/
    directories. Do not add or regenerate them; use Schema, executable evidence, and the SDK's Domain linter as guardrails.
  • Domain source imports Core and DSL authoring values only through the matching semantic
    @astrale-os/sdk/*
    subpath. Do not import
    @astrale-os/kernel-core
    or
    @astrale-os/kernel-dsl
    directly, and do not replace them with a flat SDK root barrel.
  • Authorization is Schema-owned Policy plus callable
    auth
    mode. Do not restore the legacy
    READ
    /
    EDIT
    /
    USE
    /
    SHARE
    , permission-mask, grant/revoke,
    assertPerm
    , or handler-local
    authorize
    model.
  • Inspect the current kernel-v2 SDK and Domain source before trusting older examples or API syntax.
  • Domain仓库和产品Domain包不包含
    .spec/
    目录。请勿添加或重新生成该目录;请以Schema、可执行证据以及SDK的Domain检查器作为约束。
  • Domain源码仅通过匹配语义的
    @astrale-os/sdk/*
    子路径导入Core和DSL编写相关值。请勿直接导入
    @astrale-os/kernel-core
    @astrale-os/kernel-dsl
    ,也不要用扁平化的SDK根桶文件替代它们。
  • 授权机制由Schema所属的Policy加上可调用的
    auth
    模式组成。请勿恢复旧版的
    READ
    /
    EDIT
    /
    USE
    /
    SHARE
    、权限掩码、授予/撤销、
    assertPerm
    或处理器本地的
    authorize
    模型。
  • 在信任旧示例或API语法之前,请先查看当前的kernel-v2 SDK和Domain源码。

Intent Router

意图路由

Use this router for focused work on an existing domain. It is not sufficient by itself for creating a complete new domain; use the phased workflow below for that.
  • Scaffold, deploy, install, or test a domain: read
    references/development.md
    .
  • Author schema, vocabulary, properties, Class/Edge choices, or review a schema: read
    references/modeling.md
    first. Always read it for schema work.
  • Implement handlers, callable bindings, kernel calls, graph reads/writes, or cross-domain calls: read
    references/implementing.md
    .
  • Wrap an external API, define an Integration/Provider, receive webhooks, or design side-effect/retry behavior: read
    references/integrations.md
    .
  • Decide whether to reuse/import a native Astrale domain instead of modeling a capability yourself: read
    references/domains.md
    .
  • Secure a Domain, Function, View, client call, public endpoint, identity, delegation, authentication mode, or Policy: read
    references/security.md
    .
  • Build or review browser views, mounted UI, View access, View resolution, or frontend design: read
    references/views.md
    .
  • Evolve an installed Schema, write a Migration, decide Migration versus Core, or handle reinstall/backfill behavior: read
    references/migration.md
    .
  • Optimize graph access, reduce round trips, choose indexes/queries, or review call patterns for latency: read
    references/performance.md
    .
  • Create fake/sample/demo data, testing, fixtures, demo flows, or smoke-test scenarios: read
    references/simulating.md
    .
  • Diagnose a failing live domain or runtime drift: read
    references/debugging.md
    .
使用此路由针对已有Domain开展聚焦性工作。它不足以单独用于创建完整的新Domain;此类场景请遵循下方的分阶段工作流。
  • 搭建、部署、安装或测试Domain:阅读
    references/development.md
  • 编写Schema、词汇表、属性、选择Class/Edge,或评审Schema:请先阅读
    references/modeling.md
    。Schema相关工作必须阅读此文档。
  • 实现处理器、可调用绑定、内核调用、图读写或跨Domain调用:阅读
    references/implementing.md
  • 封装外部API、定义Integration/Provider、接收Webhook,或设计副作用/重试逻辑:阅读
    references/integrations.md
  • 决定是否复用/导入原生Astrale Domain而非自行建模功能:阅读
    references/domains.md
  • 加固Domain、Function、View、客户端调用、公开端点、身份、委托、认证模式或Policy的安全性:阅读
    references/security.md
  • 构建或评审浏览器视图、挂载式UI、View访问、View解析或前端设计:阅读
    references/views.md
  • 演进已安装的Schema、编写Migration、决定Migration与Core的取舍,或处理重新安装/回填行为:阅读
    references/migration.md
  • 优化图访问、减少往返次数、选择索引/查询,或评审调用模式以降低延迟:阅读
    references/performance.md
  • 创建模拟/示例/演示数据、测试、测试夹具、演示流程或冒烟测试场景:阅读
    references/simulating.md
  • 诊断运行中出现故障的Domain或运行时偏差:阅读
    references/debugging.md

New Domain Creation Workflow

新Domain创建工作流

For every request to create, build, prototype, or make a POC of a domain, follow every phase in order. Load references when their phase begins rather than loading them all at once.
  1. Foundation: Before scaffolding or defining boundaries, read
    references/development.md
    and
    references/domains.md
    .
  2. Schema: Before authoring the schema, read
    references/modeling.md
    .
  3. Callables: Before implementing callables, read
    references/implementing.md
    and
    references/security.md
    . If an external system is involved, also read
    references/integrations.md
    .
  4. Views: When the Domain owns a browser surface, read
    references/views.md
    before designing or implementing it. Views are Schema declarations, not fields on the SDK Domain definition.
  5. Completion: Read
    references/simulating.md
    and apply its validation workflow before considering the domain complete.
Read
references/migration.md
,
references/performance.md
, and
references/debugging.md
only when the domain's lifecycle or current problem calls for them.
对于所有创建、构建、原型开发或制作Domain的POC请求,请按顺序遵循每个阶段。在阶段开始时加载对应参考文档,而非一次性加载所有文档。
  1. 基础阶段:在搭建或定义边界之前,阅读
    references/development.md
    references/domains.md
  2. Schema阶段:在编写Schema之前,阅读
    references/modeling.md
  3. 可调用组件阶段:在实现可调用组件之前,阅读
    references/implementing.md
    references/security.md
    。若涉及外部系统,还需阅读
    references/integrations.md
  4. 视图阶段:当Domain拥有浏览器端界面时,请在设计或实现前阅读
    references/views.md
    。视图是Schema声明,而非SDK Domain定义中的字段。
  5. 完成阶段:在认为Domain完成之前,阅读
    references/simulating.md
    并应用其验证工作流。
仅当Domain的生命周期或当前问题需要时,才阅读
references/migration.md
references/performance.md
references/debugging.md

Always-On Workflow

通用工作流

  1. Classify the request as full domain creation or focused work on an existing domain.
  2. For full creation, follow the phased workflow; for focused work, load the router's matching references.
  3. For schema changes, always load
    references/modeling.md
    .
  4. Inspect the current repo or scaffold before trusting API syntax from memory.
  5. For live behavior, use
    references/debugging.md
    and prove the deployed/installed/runtime path before treating source edits as effective.
  1. 将请求分类为完整Domain创建或已有Domain的聚焦性工作。
  2. 若为完整创建,遵循分阶段工作流;若为聚焦性工作,加载路由对应的参考文档。
  3. 对于Schema变更,务必加载
    references/modeling.md
  4. 在凭记忆使用API语法之前,请先查看当前仓库或搭建的内容。
  5. 针对运行时行为,使用
    references/debugging.md
    ,并在确认部署/安装/运行时路径有效后,再进行源码编辑。