rc schema silently returns the root schema for an unknown command arg
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 16
- Forks
- 0
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 27
Description
What happens
rc commands --json emits capability IDs in colon form (apps:create, products:store:plan). rc schema expects space-separated tokens (rc schema apps create). Feeding the colon form back in silently returns the root rc schema with exit code 0 and no error:
rc schema apps create # ✅ returns the apps-create schema
rc schema apps:create # ⚠️ returns the ROOT schema (name: "rc"), exit 0, no error
Why it matters
An agent's natural discovery loop is: run rc commands, copy an identifier, run rc schema <that identifier>. Since rc commands gives colon IDs, the agent pastes apps:create and gets a valid-looking-but-empty root schema. It concludes the command takes no args/flags and either guesses or gives up. The failure is silent, so it's hard to notice.
Found while auditing the AI Toolkit skills: multiple agents hit this independently.
Expected
rc schema <unknown-or-colon-joined-arg> should exit non-zero with an error (e.g. "unknown command: apps:create; did you mean apps create?") rather than falling back to the root schema.
Workaround / note
rc schema apps create(space form) works correctly.rc commands --schemas --jsonreturns per-command detail for everything in one call and is the more reliable agent path.
Low severity (a doc/UX papercut, not data loss), but it defeats the primary "ask the binary" discovery flow for agents.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the rc schema and rc commands --json entry points and reproduce the colon-form and space-separated cases described in the issue. Trace how command arguments are resolved, then add coverage for an unknown or colon-joined argument. Done means invalid input exits non-zero with an error instead of returning the root schema, while the space-separated form still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100