Skip to content

Expose friendly_name in create_schema/update_schema tool schemas + skill guidance (agent lane, follow-up to #2101) #2104

Closed

Description

@mstomar125

Context

#2101 added SchemaField.friendly_name — a display-label field distinct from name (storage key) and description (now genuine LLM-facing prose). The core mechanism landed: the Rust/TS types, write-boundary defaulting in handle_create_schema/handle_update_schema (packages/core/src/schema/mod.rs), the Default derive, and every UI call site.

Deliberately out of scope for #2101: anything under packages/agent (a different engineer's lane per this repo's ownership convention). That means the agent-facing half of the friendly_name story — the part a model actually sees when authoring a schema — was not touched. This issue tracks that remaining half, per the scope-addition comment on #2101 ("Scope addition — agent-facing tool schemas and skill guidance").

What's missing

The underlying plumbing already accepts friendlyName end-to-end — SchemaField deserializes it from any caller's JSON (optional on input, defaulted at the write boundary when omitted) and the field threads through to storage correctly. What's missing is exposing this to the model:

  1. create_schema tool schema — packages/agent/src/local_agent/tools.rs (~:758, per-field properties ~:786-793). Today the per-field description property is documented as "Field description" — circular, and now actively wrong once description means LLM-facing prose rather than a label. Needs:

    • Add friendly_name to the per-field property list: the human-readable display label (e.g. "Due date"), explicitly optional — the model should know omitting it is fine and it gets derived from name.
    • Rewrite the description guidance to ask for real semantic content (meaning, purpose, usage, an example) rather than a short label. Encourage more detail, not less.
  2. update_schema tool schema — tools.rs (:833). add_fields items (:857-865) need the same friendly_name property and rewritten description guidance. The top-level description parameter (~:844-847, the schema's description) should be double-checked for continued clarity now that field-level description means something different.

  3. rename_fields (tools.rs ~:877) — currently one operation that rekeys property data on every existing node. Under the split there are two conceptually different renames:

    • renaming name — an identity change, still requires the existing data migration, still breaking for titleTemplate/CEL/query-filter references
    • renaming friendly_name — a display-only change, must NOT trigger any data migration

    The tool needs to keep the model from conflating these — likely a way to update friendly_name without touching name (a rename_fields items array uses additionalProperties: false, so any new parameter must be added explicitly).

  4. Schema-authoring skill guidance — packages/agent/src/skill_pipeline.rs (~:370). The retrieval-facing skill text covering "define fields" / "add a field" / "rename a field" needs to teach the three-field model, and specifically stop implying description should be short or label-like.

  5. Seeding caveat — skill nodes are DB-seeded and reconciled via the per-node versioned _seed mechanism (NodeService::seed_nodes_from_templates, see 06a94eee). Revised skill text needs a content-hash bump to actually reach an already-seeded install; verify this happens automatically via the existing template pipeline rather than assuming it does.

  6. Verify the plumbing, don't assume it — trace handle_create_schema/handle_update_schema is actually invoked with the new tool-schema-exposed friendly_name parameter end to end once the tool schema changes land, including the write-boundary derivation path when a caller omits it (already covered by tests in packages/core/src/schema/schema_test.rs, but worth a live/agent-path smoke check too).

Acceptance criteria

  • create_schema tool schema exposes friendly_name per field, documented as the display label and as optional
  • update_schema.add_fields exposes friendly_name with the same semantics
  • Field-level description guidance rewritten in both tools to ask for LLM-facing semantic content
  • rename_fields distinguishes identity rename (migrates data) from display rename (does not); additionalProperties: false respected
  • Schema-authoring skill content teaches the three-field model
  • Skill/guidance reseeding verified to actually reach an existing install (content-hash bump)

Why this is a separate issue

#2101 implements the full storage/UI mechanism and is independently complete and tested — a schema-editing tool exposing friendlyName will hit the same tested handlers whether the schema is updated today or after this issue lands. But packages/agent is a different engineer's lane, and this issue's scope (tool JSON schemas + skill guidance content) belongs there rather than bundled into #2101's diff.

Activity

  1. mstomar125 commented on Aug 19, 2026

    @mstomar125
    ContributorAuthor

    Resolved in #2164.

    Exposed `friendlyName` on `create_schema`/`update_schema.add_fields`' per-field properties, rewrote field-level `description` guidance to ask for real semantic content, and closed a genuine gap the issue's own acceptance criteria required: `rename_fields` now distinguishes an identity rename (`from` != `to`, migrates data) from a display-only relabel (`from` == `to`, `friendlyName` set, no data touched) — the two can also combine in one entry. This needed a small addition at the `packages/core` layer (`NodeService::update_schema_field_friendly_name`), since `rename_schema_field`'s own doc comment already pointed at "update_schema's field-update path" as where this belongs, but that path didn't exist yet. `packages/agent`'s side stays a pure pass-through, verified by tracing rather than assumed.

    Added a new `RENAME_VS_RELABEL` skill rule (procedural — which operation for which intent, not argument shape) and regenerated `packages/skill/SKILL.md` from the same source. Verified the seed-reconciliation content hash covers the revised guidance text, so it reaches an existing install automatically.

    Full detail and test coverage in PR #2164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions