Modules routing

From agent0ai/space-agent · View interactive version

Modules routing is an AI agent skill from the GitHub repository agent0ai/space-agent. Place first-party modules correctly, make them routable, and use router seams instead of hardwiring features into shells.

How to use this skill

Skill file

Use this skill when creating or updating routed modules, deciding where files belong, or wiring a feature into the authenticated app shell.

If the user wants a reusable app surface, tool UI, settings panel, or workflow screen, prefer a custom routed page module over a space. Spaces are for persisted user-authored widget canvases; custom pages are for feature-owned interfaces.

First-Party Module Placement

Custom Pages Instead Of Spaces

Router Resolution

Router-Owned Seams

Current routed shell anchors are:

Use those anchors before editing router shell markup directly. Floating UI such as the onscreen agent belongs in the routed overlay anchors.

Common Module Shape

For a new first-party routed feature, the normal home is:

app/L0/_all/mod/_core/<feature>/
  view.html
  <feature>.css
  store.js
  panel.html or supporting components
  ext/panels/<feature>.yaml when the page should be discoverable from the dashboard
  ext/html/... only when the feature mounts into an existing seam

Minimal first-party custom page example:

app/L0/_all/mod/_core/my_tool/
  view.html
  my-tool.css
  store.js
  ext/panels/my-tool.yaml

Example panel manifest:

name: My Tool
path: my_tool
description: A custom routed tool page.
icon: build
color: "#94bcff"

Panel Helper Script

Reusable helper script:

const panelTools = await import("/mod/_core/skillset/ext/skills/development/modules-routing/panel-tools.js");

Available helpers:

Use those helpers when you need to inspect the registered panels before wiring new links or when the user asks to navigate to one of them.

Example:

const panelTools = await import("/mod/_core/skillset/ext/skills/development/modules-routing/panel-tools.js");
const panels = await panelTools.listPanels();
const userPanel = await panelTools.findPanel("/mod/_core/user/view.html");
await panelTools.goToPanel(userPanel ?? "user");

Shell Rules

Mandatory Doc Follow-Up

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.