Skip to content

Commit 9796cee

Browse files
xuyushun441-sysos-zhuangclaude
authored
docs(skills): sweep objectstack-ai SKILL.md to the ask/build two-agent model (ADR-0063/0064) (#2194)
Finishes the prose sweep that #2168 closed on prematurely, and lands the two #2165 doc items that had no home in the skill-authoring contract: - Rewrite the "Built-in Unified Assistant (ADR-0040)" section to the two surface-bound agents (`ask` OSS/free, `build` cloud/paid). `data_chat` / `metadata_assistant` now appear ONLY in the alias-table note, never as vocabulary. - Document the `surface: 'ask' | 'build' | 'both'` skill field, the built-in skills' affinities, and that an agent's tools = the union of its surface-compatible skills' tools (no global fall-through; affinity is a load error). - Document that `surface:'build'` skills are inert on OSS — intentional tiering, not a bug — and that a build-intent turn degrades gracefully. - Reconcile the stale "0040 unified assistant" row in adr/PRIORITIZATION.md (tool-scoping shipped via #2181; only the blueprint scale gate remains). Generated skill docs unchanged (generator reads frontmatter only). Refs #2165 #2168 Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent fe6f3b6 commit 9796cee

2 files changed

Lines changed: 57 additions & 19 deletions

File tree

docs/adr/PRIORITIZATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ refreshed (see §4).
6060
| 0046 package docs as metadata | `src/docs``manifest.docs` | unbuilt, but P0/P1 cheap | S–M | med |
6161
| 0010 protection L4 / unlock | `frozenPaths` evaluator + unlock RBAC | L3 + audit shipped; **no escape hatch** | M | med |
6262
| 0017 view Phase 5 | view RLS backend + designer | RLS still **client-enforced**; designer in objectui | S (backend) | med |
63-
| 0040 unified assistant | tool-scoping enforcement + blueprint scale gate | still advisory; scale gate **not implemented** | M | med-high |
63+
| 0063/0064 (supersedes 0040) | blueprint object-count scale gate | tool-scoping **shipped** (ADR-0064, #2181 — tools = skills' tools, no global fall-through; affinity is a load error); blueprint scale gate still **not implemented** | S | med |
6464
| 0029 K4 | remove migration-era empty barrels | cleanup only | S | low-med |
6565

6666
---

skills/objectstack-ai/SKILL.md

Lines changed: 56 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,62 @@ Agent → Skill → Tool
5757
> agents is supported but considered legacy. Skills provide better
5858
> discoverability, instruction scoping, and reuse.
5959
60-
### Built-in Unified Assistant (ADR-0040)
61-
62-
The runtime ships a unified persona agent **`data_chat`** (`DEFAULT_DATA_AGENT_NAME`)
63-
— the implicit default copilot for any app that doesn't pin `app.defaultAgent`
64-
(Studio overrides to `metadata_assistant`). It attaches built-in skills:
65-
66-
- **`data_explorer`** — read-only data Q&A: `list_objects`, `describe_object`,
67-
`query_data` / `query_records`, `get_record`, `aggregate_data`, `visualize_data`.
68-
- **`metadata_authoring`** + **`solution_design`** — app-building, **cloud/EE only**.
69-
70-
To grant data exploration to your own agent, add `data_explorer` to its `skills[]`;
71-
deactivating that skill (`active: false`) revokes data Q&A for every agent that
72-
references it.
73-
74-
> **Edition gate (#1803):** when neither `metadata_authoring` nor `solution_design`
75-
> is registered — the open single-env framework — the assistant is **query-only**
76-
> and declines build/authoring requests. App-building tools are supplied entirely
77-
> by the cloud AI Studio plugin; do not assume they resolve in the open framework.
60+
### Built-in agents: `ask` & `build` (ADR-0063 / ADR-0064)
61+
62+
The runtime ships **exactly two** platform agents, bound by *surface* — the user
63+
never picks from a roster; the surface they are in selects the agent:
64+
65+
- **`ask`** — the **data product** (≈ Claude Chat). Conversational read / query /
66+
explore over records, plus running the business **actions** the app already
67+
exposes. End-user audience, RLS-bounded. Canonical id `ask` (`ASK_AGENT_NAME`).
68+
Open-source · free — ships in `@objectstack/service-ai`, and is the implicit
69+
copilot for any app that does not pin `app.defaultAgent`.
70+
- **`build`** — the **authoring product** (≈ Claude Code). Agentic authoring of
71+
*metadata* (objects, fields, views, flows) through plan → draft → verify →
72+
publish. Builder audience, governance-gated. Canonical id `build`. Cloud-only ·
73+
paid — ships in the cloud AI Studio plugin; Studio pins it via `app.defaultAgent`.
74+
75+
There is **no per-turn intent classifier**: a `build`-shaped request arriving at
76+
`ask` is declined and redirected to the Builder, never silently re-routed into
77+
authoring (ADR-0063 §1/§5).
78+
79+
> **Legacy names are aliases only.** `data_chat``ask` and
80+
> `metadata_assistant``build` resolve through the alias table for old bookmarks
81+
> and persisted `agent_id`s; they are **not** vocabulary — always write `ask` /
82+
> `build`. `*.agent.ts` is closed to third parties (`agent` type is
83+
> `allowRuntimeCreate:false, allowOrgOverride:false`): you extend the platform
84+
> with **skills**, never by authoring an agent (ADR-0063 §2).
85+
86+
#### Skill → agent affinity: the `surface` field (ADR-0063 §3)
87+
88+
Every skill declares which surface it binds to via
89+
`surface: 'ask' | 'build' | 'both'` (defaults to `'ask'`). A skill may bind only
90+
to an agent whose surface it matches; `'both'` binds to either. The runtime
91+
enforces this in `resolveActiveSkills` at load time — an incompatible binding is a
92+
**fast load error**, not a silent mis-scope. An agent's tool set is the **union of
93+
its surface-compatible skills' tools** — there is no global fall-through
94+
(ADR-0064), so `ask` cannot author by construction.
95+
96+
The built-in skills and their affinities:
97+
98+
| Skill | `surface` | Owns | Edition |
99+
|---|---|---|---|
100+
| `schema_reader` | `both` | `list_objects`, `describe_object`, `query_data` | OSS |
101+
| `data_explorer` | `ask` | `query_records`, `get_record`, `aggregate_data`, `visualize_data` | OSS |
102+
| `actions_executor` | `ask` | `action_*` (the business actions an object exposes) | OSS |
103+
| `metadata_authoring` + `solution_design` | `build` | metadata draft / verify / publish + blueprint propose / apply | **cloud only** |
104+
105+
To grant data exploration to your own (platform-internal) agent, add
106+
`data_explorer` / `schema_reader` to its `skills[]`; deactivating a skill
107+
(`active: false`) revokes that capability for every agent that references it.
108+
109+
> **`surface:'build'` skills are inert on OSS — by design, not a bug.** The open
110+
> single-env framework ships only the `ask` agent; `metadata_authoring` /
111+
> `solution_design` (and any third-party `surface:'build'` skill) are supplied by
112+
> the cloud AI Studio plugin and simply do not resolve in OSS. A `build`-intent
113+
> turn on OSS degrades gracefully ("authoring lives in the cloud Build assistant")
114+
> instead of dead-ending — this is intentional tiering. Do not assume authoring
115+
> tools resolve in the open framework.
78116
79117
> **`visualize_data` (#1820/#1821):** the only built-in tool that draws a chart —
80118
> it aggregates an object and emits an inline `data-chart` part. Auto-registered

0 commit comments

Comments
 (0)