Repository navigation
Record that project is intentionally not slash-command-creatable (closes #2133) - #2151
Conversation
#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
Pragmatic Code Review — PR #2151Verdict: 🟡 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. SummaryThis 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 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 resultsAll confirmed against the code at
CLAUDE.md compliance: clean. No 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📁 The comment reads:
Immediately above it sit 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 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 The same paragraph appears in condensed form at 📁 🟡 Important📁 Three claims here are pure frontend state:
I checked: 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📁 Placing the block directly above the The gap is the reverse direction. A reader who lands on Nit: 📁 Nit: 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 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 Keep the scope exactly as it is. Adjust the tense and name the exceptions. Assessment against the review framework
Net positive as-is. The two 🟡s are cheap to address and make the change strictly better at the one job it has. |
malibio
left a comment
There was a problem hiding this comment.
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
Review addressed — commit
|
…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
Re-Review — commits since
|
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.
projecttherefore gets no plugin registration and no/project.This is the "If no" branch of #2133. Projects stay reachable —
projectis inSIDENAV_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 theprojectschema definitionpackages/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 missingprojectNodePluginVerification 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:
rendersAsEntityRowderives from absence of an inline node component, not from plugin registration (node-type-predicates.ts:35).projectalready 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:
/personand/ai-chatare entity types that currently have slash commands.createPluginFromSchema(schema-plugin-loader.ts:127), with five assertions covering it inschema-plugin-loader.test.ts.Flagged for @malibio on #2133.