Skip to content

Record that project is intentionally not slash-command-creatable (closes #2133) - #2151

Merged
malibio merged 4 commits into
mainfrom
issue-2133-project-no-slash-command
Aug 18, 2026
Merged

malibio merged 4 commits into
mainfrom
issue-2133-project-no-slash-command

Conversation

@malibio

@malibio malibio commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Resolves the open product question in #2133.

Decision

Slash commands are reserved for content primitives — text, headers, checkboxes, code, quotes, lists, rules, tables — plus task (the deliberate exception, since capturing a task mid-thought is core to outlining).

Entity types are not slash-creatable: neither core entity types nor user-defined schema types. project therefore gets no plugin registration and no /project.

This is the "If no" branch of #2133. Projects stay reachable — project is in SIDENAV_CORE_TYPES, so it is browsable/queryable in the sidenav and opens to the generic schema-driven properties form. Only ad-hoc mid-outline creation is out.

Changes

Comments only — no behavior change. The rationale is recorded at both ends so the absence reads as intentional rather than as an oversight:

  • packages/core/src/models/core_schemas.rs — on the project schema definition
  • packages/desktop-app/src/lib/plugins/core-plugins.ts — a "which types get a slash command" note placed where a reader scanning the registered-plugin list would look for the missing projectNodePlugin

Verification note

#2133 left open whether entity-row behavior ("open in other pane", arrow-navigation skip) would still work once a plugin existed. Moot under this decision, but worth recording: rendersAsEntityRow derives from absence of an inline node component, not from plugin registration (node-type-predicates.ts:35). project already renders correctly as an entity row today with no plugin at all.

Follow-ups not included here

Applied consistently, the rule flags existing surfaces that this PR deliberately does not touch — each removes a working user-facing affordance and deserves its own decision:

  1. /person and /ai-chat are entity types that currently have slash commands.
  2. User-defined schema types each get a generated slash command via createPluginFromSchema (schema-plugin-loader.ts:127), with five assertions covering it in schema-plugin-loader.test.ts.

Flagged for @malibio on #2133.

 #2133)

Product decision: slash commands are reserved for content primitives (text,
headers, checkboxes, code, quotes, lists, rules, tables) plus `task`. Entity
types are not slash-creatable — neither core entity types nor user-defined
schema types.

`project` therefore gets no plugin registration and no `/project` command. It
stays reachable via the sidenav as a user-queryable entity type and opens to the
generic schema-driven properties form; only ad-hoc mid-outline creation is out.

Documents the rationale at both ends so the absence reads as intentional rather
than as an oversight: on the `project` schema definition, and in the plugin
registry where a reader would look for the missing registration.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TDtMcV2chVWTDbMFerp5Vs
@malibio

malibio commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Pragmatic Code Review — PR #2151

Verdict: 🟡 APPROVE WITH SUGGESTIONS — net positive, merge-eligible. One 🟡 Important finding I'd want addressed before merge (an inaccuracy in the TS comment that a future reader can falsify in ~30 seconds by scrolling up 40 lines), plus one 🟡 on layering and a couple of 🟢s.

Summary

This is the "If no" branch of #2133, correctly scoped: a product decision was made, and the change records it where the absence is felt rather than inventing an enforcement mechanism nobody asked for. Comments-only, zero behavior change, zero risk of regression. The core instinct — document the absence at both ends so a future reader doesn't "fix" it — is exactly right, and this is the kind of change that pays for itself the first time someone opens core-plugins.ts and wonders where projectNodePlugin went.

I independently verified every factual claim in both blocks. Findings below are ordered by how likely they are to mislead a future reader, since misleading comments are the only failure mode a comments-only PR has.


Verification results

All confirmed against the code at 3e4f0a8b:

Claim Status
project has no plugin registration ✅ Confirmed — only occurrences in core-plugins.ts are the new comment itself (lines 700–701)
project in SIDENAV_CORE_TYPES ✅ Confirmed — schemas.svelte.ts:24, alongside task, skill, person, agent-guidance
rendersAsEntityRow derives from absence of inline node component, not registration ✅ Confirmed — node-type-predicates.ts:35 returns !hasInlineNodeComponent(nodeType), which delegates to pluginRegistry.hasNodeComponent
project gets the generic schema-driven form ✅ Confirmed — needsGenericSchemaForm at node-type-predicates.ts:47, and the existing doc comment there names project explicitly
Primitives listed (text, header, checkbox, code-block, quote-block, ordered-list, horizontal-line, table) all have slash commands ✅ Confirmed
task has a slash command ✅ Confirmed — core-plugins.ts:121
/person and /ai-chat exist ✅ Confirmed — core-plugins.ts:662 and :631
createPluginFromSchema emits a slash command for every user-defined schema ✅ Confirmed — schema-plugin-loader.ts:126–140, unconditional
Five test assertions depend on that ✅ Confirmed — schema-plugin-loader.test.ts:98, 118, 146, 155, 165

CLAUDE.md compliance: clean. No .md files added outside nodespace-docs. No issue numbers in either comment block (the #2133 references live only in the commit message and PR body, which is exactly where the standard permits them). No backward-compat, deprecation, or transition language. No #[allow(dead_code)], no lint suppression.

Tests: correctly omitted. Comments have no behavior to assert. Adding a test that greps for a comment string would be a test of the comment, not of the system — pure maintenance liability. Agreed with the call to ship none.


Findings

🟡 Important

📁 packages/desktop-app/src/lib/plugins/core-plugins.ts:694–696 — the "Entity types are not slash-creatable" paragraph is falsified 40 lines above it, in the same file.

The comment reads:

Entity types are not slash-creatable — neither core entity types nor user-defined schema types. Projects, collections, documents and users are containers and records set up deliberately...

Immediately above it sit aiChatNodePlugin (line 618, /ai-chat) and personNodePlugin (line 656, /person) — both core entity types, both with live slash commands, both registered in the corePlugins array 20 lines below the comment. And createPluginFromSchema (schema-plugin-loader.ts:127) unconditionally generates a slash command for every user-defined schema type, directly contradicting the "nor user-defined schema types" clause.

The example list is also selectively accurate in a way that reads as evasive: it names collections, documents and users — the three registered entity plugins that genuinely have slashCommands: [] (core-plugins.ts:510, 555, 585) — while omitting person and ai-chat, the two that don't. A reader who spot-checks the list will find it holds, conclude the rule is enforced, and only later discover the exceptions.

This matters more than usual here because of CLAUDE.md's own stance: "Do not infer architecture from existing code comments — they may be stale." That warning exists because stale comments have burned this codebase before. A comment that is already inaccurate on the day it lands doesn't become stale — it ships stale. The next reader has three options, and two are bad: believe the comment and be wrong about the system; disbelieve the comment and discard the decision it was written to preserve; or spend the time to reconstruct which half is true. Only the third is correct, and it's the expensive one.

The fix is small and makes the comment strictly more valuable, not less. State the rule as the intended rule and name the known exceptions as known:

 * Entity types are **not** slash-creatable — neither core entity types nor user-defined
 * schema types. Projects, collections, documents and users are containers and records set
 * up deliberately — by the agent, or through the schema/entity surfaces — not typed in ad
 * hoc mid-outline. They stay reachable: core entity types are listed in the sidenav as
 * user-queryable types and open to schema-driven properties forms.
 *
 * Two surfaces predate this rule and still contradict it: `person` and `ai-chat` carry
 * slash commands above, and `createPluginFromSchema` generates one for every user-defined
 * schema type. Each removes a working affordance if changed, so each needs its own
 * decision — do not treat them as precedent for adding new entity-type slash commands.

That version is honest, survives contact with the code, and does the job the PR set out to do — it stops a future reader from citing /person as license to add /project. Right now the comment is silent on precisely the argument someone will make against it.

The same paragraph appears in condensed form at 📁 packages/core/src/models/core_schemas.rs:245–247 and has the same issue, though it's less acute there — the Rust file has no /person sitting 40 lines up to give the lie away. Worth a shorter version of the same caveat for consistency.

🟡 Important

📁 packages/core/src/models/core_schemas.rs:249–251 — the Rust comment asserts frontend facts the Rust crate cannot see, and cannot be kept honest by anything in this crate.

Three claims here are pure frontend state:

  • "project has no frontend plugin registration at all" → core-plugins.ts
  • "they are listed in the sidenav as a user-queryable entity type" → SIDENAV_CORE_TYPES in schemas.svelte.ts:24
  • "open to a schema-driven properties form" → needsGenericSchemaForm in node-type-predicates.ts

I checked: core_schemas.rs mentions "frontend", "plugin", or "sidenav" nowhere else — lines 245–251 are the only occurrences in the file. nodespace-core has no dependency on the desktop app, so nothing compiles, tests, or lints these three sentences. If someone drops project from SIDENAV_CORE_TYPES next month, the Rust comment silently becomes a lie with no signal anywhere.

This is a real coupling cost, not a style objection: it puts the durable claim (the product decision) and the volatile claims (three specific frontend implementation details) in the same block, at the same apparent confidence, in the crate least able to verify either.

Suggestion: keep the decision in Rust, push the mechanism to TS. The Rust comment only needs the part that is true regardless of what the frontend does:

// Intentionally not slash-command-creatable. Slash commands are reserved for content
// primitives plus `task`; entity types like `project` are set up deliberately — by the
// agent, or via the schema/entity surfaces — rather than typed in ad hoc mid-outline.
// Projects remain reachable through the entity/sidenav surfaces. See the slash-command
// note in the frontend plugin registry for how that is wired.

That drops nothing a reader of this file needs, and removes three sentences that only the frontend can keep true. The TS block already carries the mechanism in full — this is DRY applied to documentation, with the added benefit that the duplicated half is the half most likely to drift.

🟢 Suggestions

📁 packages/desktop-app/src/lib/plugins/core-plugins.ts:687 — placement is good; discoverability from the Rust side is the weak link.

Placing the block directly above the corePlugins array is the right call — a reader scanning the registration list for projectNodePlugin hits the explanation before the array, which is exactly the moment of confusion. Good instinct, keep it.

The gap is the reverse direction. A reader who lands on core_schemas.rs first is told project "has no frontend plugin registration" but not where that registry lives; they'd have to grep. If you take the layering suggestion above, the cross-reference to the plugin registry closes this. Cheap, and it makes the two blocks function as one document with two entry points rather than two comments that happen to agree.

Nit: 📁 core-plugins.ts:691 — "rules, tables" in the primitive list maps to horizontal-line and table plugin ids. The prose names are friendlier and I'd keep them, but the Rust version at core_schemas.rs:246 abbreviates to "(text, headers, code, lists, ...)" while the TS version enumerates all eight. Since these two blocks are the canonical statement of the same rule, matching the enumeration exactly (or trailing-... in both) removes any doubt about whether the shorter list is an abbreviation or a narrower rule. Minor, optional.

Nit: SIDENAV_CORE_TYPES also contains skill and agent-guidance — two more core entity types with no slash command and, unlike project, no plugin entry either. The rule this PR documents covers them correctly, so nothing is wrong; just noting that the decision generalizes further than the project-shaped framing suggests. If the "which types get a slash command" heading is meant to be the general statement (and it reads like it is), it already does the job for those two.


On the key question: is documenting an unenforced rule acceptable?

Yes — with the caveat above. Documenting intent ahead of enforcement is legitimate and often the right sequencing: the alternative is either doing nothing (and letting the decision evaporate) or ripping out /person and /ai-chat in a PR whose stated scope is "record a decision," which would bundle an unrelated user-facing behavior change into a comments-only commit. The PR body's follow-up section makes the right call — each removal kills a working affordance and deserves its own decision.

What tips it from "acceptable" to "needs a tweak" is the phrasing, not the scope. A comment that says "entity types are not slash-creatable" states a fact about the system. The true statement is "entity types should not be slash-creatable; two surfaces predate the rule." Those are different claims with different costs when wrong, and the second one is both accurate and more useful — it tells the reader what to do when they encounter /person, which the current text leaves them to guess.

Keep the scope exactly as it is. Adjust the tense and name the exceptions.


Assessment against the review framework

  • Architecture — sound. No new abstraction, no speculative projectNodePlugin, no enforcement mechanism invented for a rule with two live exceptions. Correctly resisted YAGNI pressure to "make it real."
  • Correctness — no behavior touched. All positive claims verified true; the issue is a claim of universality that isn't.
  • Security — N/A.
  • Maintainability — the one dimension this PR is actually about, and where both findings land. Fixing them is ~6 lines.
  • Testing — correctly none.
  • Performance / Dependencies — N/A. No deps, no bundle impact (comments strip at build).

Net positive as-is. The two 🟡s are cheap to address and make the change strictly better at the one job it has.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review: APPROVE WITH SUGGESTIONS (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.

…xceptions

Two Important findings from the review of the initial comments.

The plugin-registry block asserted "Entity types are not slash-creatable" as
fact, which `/person` and `/ai-chat` falsify 40 lines above it in the same file,
and which `createPluginFromSchema` falsifies for user-defined types. A comment
that ships already-inaccurate leaves the next reader to work out which half is
true. Restated as the intended rule, with both predating surfaces named as
known exceptions and explicitly not precedent — which also forecloses the
argument someone would otherwise make for adding `/project`.

The Rust comment asserted three frontend facts (no plugin registration, sidenav
listing, schema-driven form) that nothing in this crate compiles, tests, or
lints; `nodespace-core` has no dependency on the desktop app, so they would rot
silently. Trimmed to the decision itself plus a pointer to the plugin registry,
where the mechanism and its exceptions live.

Also matched the primitive enumeration across both comments so the shorter list
cannot read as a narrower rule.

Skipped one suggestion: generalizing the rule to name `skill` and
`agent-guidance`. Verified both have no plugin and no slash command, so the rule
already covers them correctly; enumerating more types invites staleness for no
gain.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TDtMcV2chVWTDbMFerp5Vs
@malibio

malibio commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Review addressed — commit b37ffa89

3 of 4 addressed, 1 skipped.

✅ 🟡 Comment falsified in-file (core-plugins.ts)

Agreed, and this was the finding worth catching. The block stated "Entity types are not slash-creatable" as a fact about the system, while /person (:662) and /ai-chat (:631) sit 40 lines above it and createPluginFromSchema contradicts the user-defined-types clause outright. Per CLAUDE.md's own warning about inferring architecture from comments, shipping an already-inaccurate one is worse than shipping none — it leaves the reader to reconstruct which half is true.

Restated as the intended rule ("should not be"), with both predating surfaces named explicitly and marked as not precedent. That also closes a gap the original had: it now answers the reader who finds /person and reasons "so /project is fine too" — previously the comment was silent on exactly the counter-argument someone would raise.

✅ 🟡 Rust comment asserted unverifiable frontend facts

Right on layering. The three claims (no plugin registration, sidenav listing, schema-driven form) are all frontend state that nodespace-core cannot compile, test, or lint — it has no dependency on the desktop app. Drop project from SIDENAV_CORE_TYPES and the Rust comment silently becomes false with no signal.

Trimmed to the decision itself, plus an explicit note that this crate cannot enforce it and a pointer to the plugin registry where the rule and its exceptions live.

✅ 🟢 Primitive enumeration mismatch

Matched across both files so the abbreviated Rust list can't read as a narrower rule.

⏭️ Skipped: generalize to name skill and agent-guidance

Verified both: absent from core-plugins.ts entirely, so no plugin and no slash command — the documented rule already covers them correctly, as the review itself noted. Enumerating every conforming type adds a list that must be maintained as types are added, for no behavioral or explanatory gain. Worth revisiting only if one of them later acquires a slash command, which would make it an exception worth naming.


Re-Review Decision

Decision: NO RE-REVIEW NEEDED

Rationale: Comments-only, as the original commit was — no logic, no API, no behavior touched. The changes are precisely what the review asked for, applied to the two blocks it identified, and every factual claim in the revised text is one the reviewer already independently verified. Full pre-push gate (test:all + cargo build + test:e2e) passed on push; quality:fix exit 0.

malibio and others added 2 commits August 18, 2026 18:38
…oval

The known-exceptions paragraph said each exception "removes a working affordance
if changed, so each needs its own decision". That overstated the cost: entity
types already reach creation through the sidenav's type view
(navigation-sidebar → handleSchemaClick → QueryNodeViewer's create-instance
button), which covers built-in and user-defined types alike. Removing these
slash commands strands nothing.

Restated as slated for removal, naming the sidenav as the path that makes it
safe, so a reader knows the direction of travel rather than reading the
exceptions as an unresolved standoff.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TDtMcV2chVWTDbMFerp5Vs
Re-review of d685ed8 caught that "entity types reach creation through the
sidenav's type view" is false for `ai-chat`: it is not in SIDENAV_CORE_TYPES
(only task, project, skill, person, agent-guidance), so it has no sidebar
presence at all today. Split the claim — `person` and user-defined types already
reach the type view; `ai-chat` gets a dedicated sidebar section before its
command is removed.

The paragraph above had the same overstatement from the earlier commit ("core
entity types are listed in the sidenav"). Qualified to "most", named
SIDENAV_CORE_TYPES as the actual gate, and noted the rest reach creation through
a surface of their own — `collection` has its own sidebar button, `query` is
materialized from a type view.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TDtMcV2chVWTDbMFerp5Vs
@malibio

malibio commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Re-Review — commits since b37ffa89

Scope: d685ed8f only (one 5-line comment change). Previous review's 4 findings were addressed in b37ffa89; none regressed.

Verdict: 🟡 REQUEST CHANGES → fixed in b9a6b3f9

🟡 Important: the new sentence was factually wrong for one of the two types it named

📁 packages/desktop-app/src/lib/plugins/core-plugins.ts:703

d685ed8f replaced "each removes a working affordance if changed" with:

Both are slated for removal — entity types reach creation through the sidenav's type view instead

ai-chat is not in SIDENAV_CORE_TYPES (stores/schemas.svelte.ts:24 holds only task, project, skill, person, agent-guidance). It has no sidebar presence at all today, and /ai-chat is its only user-facing creation path. So the sentence asserted a creation path that does not exist for one of the two surfaces named in that very sentence — the same class of defect the first review flagged, reintroduced while fixing it.

Fixed by splitting the claim along what is actually true:

 * schema type. Both are slated for removal — `person` and user-defined types already
 * reach creation through the sidenav's type view, and `ai-chat` gets a dedicated sidebar
 * section before its command goes — so do not read either as precedent for adding new
 * entity-type slash commands.

🟡 Important: same overstatement one paragraph up, from the earlier reviewed commit

📁 packages/desktop-app/src/lib/plugins/core-plugins.ts:698-699

They stay reachable: core entity types are listed in the sidenav as user-queryable types

Also false for ai-chat, and this one predates d685ed8f — it survived the first review because the sidenav gate had not been examined then. Qualified to "most", named SIDENAV_CORE_TYPES as the actual gate, and noted the rest reach creation through a surface of their own (collection has its own sidebar button; query is materialized from a type view).

Verification

SIDENAV_CORE_TYPES membership checked directly against stores/schemas.svelte.ts:24. quality:fix exit 0; full pre-push gate passed on b9a6b3f9.


Re-Review Decision

Decision: NO FURTHER RE-REVIEW NEEDED

Rationale: Both findings are corrections to prose in a comments-only PR, verified directly against the constant that governs the claim. No logic, API, or behavior is touched anywhere in this PR. The remaining text makes no factual assertion that has not now been checked against the code.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated pragmatic-code-review (re-review of d685ed8): REQUEST CHANGES → fixed in b9a6b3f (posted as a comment — GitHub blocks self-review verdicts). Two inaccurate sidenav claims found and corrected. Full findings in the review comment above.

@malibio
malibio merged commit e8e6f49 into main Aug 18, 2026
@malibio
malibio deleted the issue-2133-project-no-slash-command branch August 18, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant