Repository navigation
Bug: workspace tab documentation causes LLMs to use browser-view instead of entity-view; missing decision rules and related requirement #69
Description
Summary
The workspace documentation given to LLMs causes predictable errors when adding tabs pointing to URLs. The LLM reaches for browser-view (which opens a raw WebView with no history, bookmarking, or entity semantics) instead of first creating an external entity and using entity-view. The docs also omit any mention of related (required to make entities show as sub-items per #62) and give no type-agnostic guidance for deciding which tab kind to use for a given entity type.
Observed failure
When asked to "add a closed issues tab", the LLM:
- Added a
browser-viewtab with a hardcoded URL — structurally valid but semantically wrong (bypasses entity model, no display-name, not queryable). - Required a follow-up correction to create an
externalentity first and switch the tab toentity-view.
The open-issues tab in the same workspace was already an entity-view → external entity, but the LLM did not learn from it because workspace-schema.md presents browser-view as an equally valid first-class option with no guidance on when to prefer one over the other.
Affected documentation files
1. JsonEntities/documentation/workspace-schema.md
Problems:
- Lists
browser-viewandentity-viewas peers with no decision rule. - No mention that URL-bearing content should be an
externalentity so it participates in the entity model (queryable, displayable, relatable). - No mention of the
relatedrelationship requirement (per Workspaces view: show related entities as collapsed sub-items #62) when adding entity tabs. - Example entity names are not in the correct
["namespace", "name"]array-of-arrays format that matches the schema.
Fix: Add a "Choosing a tab kind" section:
## Choosing a tab kind
Use `entity-view` for ALL entity-backed content. This includes:
- Notes, agent sessions, git repositories, tasks, and any other entity type.
- External URLs: create an `external` entity with a `urls` map first, then
point the tab at it with `entity-view`. Do NOT use `browser-view` for URLs
you want to track or revisit — external entities are queryable, displayable,
and can be marked related to the workspace.
Use `browser-view` ONLY for transient, one-off URLs that do not warrant their
own entity (e.g. a temporary debug URL you will not reuse).
When adding an entity-view tab, also create a `related` relationship between
the workspace and the target entity so it appears as a sub-item in the
workspaces view. See "Adding a tab to a workspace" in issue #62.
Also add a full worked example showing: create external entity → create related relationship → add entity-view tab, all in one workspaces_entity_update call.
2. JsonEntities/documentation/external-schema.md
Problems:
- Example uses a generic name under
["external-systems", ...]— does not show the canonical["external", "<name>"]naming convention used by all existing external entities (github-phantom-workspaces,phantom-workspaces-github-issues). - No mention that the
"default"URL key is special: it is the URL the workspace tab will open. - No mention that
entity-typesmust include"entity"as well as"external".
Fix: Update the example to use the ["external", "<name>"] naming convention, add a note that "default" is the primary URL opened by the workspace tab, and fix entity-types to include "entity".
3. JsonEntities/documentation/entity-workspace-agent-tool-instruction-details.md
Problems:
- Contains no guidance on workspace tab management at all.
- An LLM reading only this file (as instructed) gets no decision rules for tab kinds, no mention of
externalentities, and no mention of therelatedrequirement.
Fix: Add a "Adding tabs to a workspace" section that covers:
- Always prefer
entity-viewoverbrowser-view. - For URLs, create an
externalentity first (with["external", "<name>"]naming and a"default"URL key), then useentity-viewpointing to it. - Always create a
relatedrelationship between the workspace and the target entity in the same update. - The correct
entity-typesfor anexternalentity is["entity", "external"].
Root cause
The documentation describes the data model but gives no decision rules for LLM callers. Adding the three-step process (create entity if needed → create related → add entity-view tab) as an explicit, type-agnostic recipe — alongside a clear "never use browser-view for tracked content" rule — would prevent the class of error observed here.
Activity
JoshuaRowePhantom commentedon Jun 26, 2026
Fixed via workspace entity updates (no file changes required). Updated three documentation entities in the data store: workspace-schema (added 'Choosing a tab kind' section + worked example), external-schema (updated naming convention, added 'default' URL key note, fixed entity-types), and entity-workspace-agent-tool-instruction-details (added 'Adding tabs to a workspace' section).
JoshuaRowePhantom commentedon Jun 29, 2026
Verification failed
Checked: Repository source files on
mainbranch atC:\dev\Phantom.Workspaces-Main:Phantom.Workspaces.Data.Core/JsonEntities/documentation/workspace-schema.mdPhantom.Workspaces.Data.Core/JsonEntities/documentation/external-schema.mdPhantom.Workspaces.Data.Core/JsonEntities/documentation/entity-workspace-agent-tool-instruction-details.mdAlso checked:
git log main --grep='#69'(no commits found).Found: The issue was closed with the comment that the fix was applied via workspace entity updates to the live data store, not to the repository source files. The three
.mdfiles in the repository are unchanged.Missing (all three files unpatched in the repository):
workspace-schema.md- No "Choosing a tab kind" section.browser-viewandentity-vieware still presented as peers with no decision rule. No worked example of create-external-entity to create-relatedto add-entity-view-tab.external-schema.md- Example still uses["external-systems", "our-api"]naming (not["external", "<name>"]). No mention that"default"is the primary URL opened by workspace tabs.entity-typesstill shows only["external"], missing"entity".entity-workspace-agent-tool-instruction-details.md- No "Adding tabs to a workspace" section. No guidance on preferringentity-view, creatingexternalentities, or therelatedrequirement.