Repository navigation
Description
Problem
Deleting a schema works, but nothing in the CLI's own surface reveals it. nodespace schema --help lists:
Commands:
list List all schema definitions
get Get a single schema definition by ID
create Create a new schema from a JSON params blob
update Update an existing schema from a JSON params blob
No delete. An external agent reasonably concluded the capability did not exist, and told the user so:
The CLI cannot delete a schema. Only list, get, create, update — there's no delete at any level.
It then proposed a workaround — stripping the schema to an empty shell via remove_fields / remove_relationships — and flagged the supposed gap as product feedback.
The capability exists. Schemas are nodes: schema list output carries "node_type": "schema" with "id": "adr", which is exactly what node delete accepts. The working sequence is:
nodespace schema update --params '{"schema_id":"adr","remove_relationships":[...]}'
nodespace node delete adrThe agent found this only after the user pointed out that a schema is a node.
Two things make it undiscoverable
1. schema --help presents a closed surface. A subcommand group listing four verbs reads as the complete set of operations on that noun. Nothing says schemas are ordinary nodes reachable through node, so an agent enumerating schema's capabilities sees a deliberate omission rather than a redirect.
2. The prerequisite is undocumented until you hit it. Deleting a schema with relationship declarations fails:
schema_has_declarations: schema 'adr' has 4 relationship declaration(s)
pointing at or from it; remove them via update_schema before deleting
That error is well written — it names the blocker and the fix. But nothing documents the constraint in advance. references/cli.md mentions remove_relationships only as one key in a params list (:490, :495), never as the prerequisite for deletion.
Why this matters for agents specifically
schema create is available to agents, so an agent can add schemas to a user's workspace. Without a discoverable delete path, every experimental schema an agent creates is permanent from its perspective — it can make a mess it cannot clean up, and will report the mess as unfixable.
That is the asymmetry to close: create is discoverable, delete is not.
Fix
Either surface is defensible; the point is that one of them must exist.
- Decide: add a
schema delete <id>subcommand, or document that schemas are nodes andnode deleteis the path - If adding the subcommand: it should handle the relationship-declaration prerequisite itself, or fail with the same actionable message
- If documenting instead:
schema --helpsays so, so an agent enumerating the group is redirected rather than misled - Document the delete sequence in
packages/agent/src/skill_rules.rs(source of truth forreferences/cli.md), including the remove-declarations prerequisite - State the symmetry: relationship targets must exist to declare one, and must be absent to delete the schema they point at
- Verified against a cold agent: asked to remove a schema it created, it finds the path without being told schemas are nodes
Context
From an external Claude Code session cleaning up a test schema. The daemon behaved correctly throughout — the failed delete was a guardrail rejecting the call up front, with nothing partially modified. This is purely a discoverability defect.
Activity
malibio commentedon Sep 7, 2026
Baseline — Frontend: 233 test files, 4900 tests passed
Add a discoverable `schema delete` subcommand (closes #2397) (#2435)