Skip to content

Implement ADR-0063/0064: split ask/build agents by surface; tool scoping #2168

Description

@xuyushun441-sys

Implementation tracking for ADR-0063 (two agents bound by surface) and ADR-0064 (tool scoping). Decision PR: #2167. Landscape: docs/audits/2026-06-ask-build-agent-development-assessment.md.

Split the personas (reverse ADR-0040 unified assistant)

  • Remove the unified ask-carries-all-skills definition + per-turn intent preamble (service-ai/src/agents/data-chat-agent.ts); ask carries only surface:'ask' skills.
  • Delete the buildRegisterActive degradation shim (service-ai/src/agent-runtime.ts:179) — no longer needed once surfaces are separate.
  • Bind agent → surface in ../objectui (data console → ask, Studio → build); keep the picker hidden/builder-only.

Naming (finish both sides of the rename)

  • service-ai/src/agents/data-chat-agent.tsask-agent.ts; DEFAULT_DATA_AGENT_NAMEASK_AGENT_NAME (keep LEGACY_DATA_AGENT_NAME='data_chat').
  • ../cloud/service-ai-studio: make build the canonical id (currently still metadata_assistant); register metadata_assistant as the permanent alias.
  • Prose sweep: "Data/Metadata Assistant" → ask/build; aliases live only in the alias table.

Skill ↔ agent affinity (ADR-0063 §3)

  • Add surface: 'ask' | 'build' | 'both' to SkillSchema (spec/src/ai/skill.zod.ts); backfill the four built-in skills.

Tool scoping (ADR-0064)

  • Remove the global fall-through in tool resolution; resolve wildcards against skill-claimed names only (kill the actions_executor empty-array + fall-through hack).
  • Add a surface:'both' schema_reader skill owning describe_object/list_objects/query_data; stop dual-listing by comment.
  • Make incompatible skill↔agent binding a fast load error in resolveActiveSkills.
  • Tests: tools(ask) contains no create_*/*_metadata/blueprint tools (cloud + OSS); authoring tools present only under build.

Withdraw tenant custom agents (ADR-0063 §2)

  • spec/src/kernel/metadata-plugin.zod.ts: set agent type allowRuntimeCreate:false, allowOrgOverride:false.
  • Filter custom agents from the runtime catalog; drop the app.defaultAgent custom-agent guidance in the cloud plugin.

Deferred

  • D4 deployment guardrail-floor schema — defer (no tenant agent to floor once the above lands).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions