143 lines
9.0 KiB
Markdown
143 lines
9.0 KiB
Markdown
# RuneStone project instructions
|
|
|
|
## Documentation
|
|
|
|
Keep the README focused on the project, its usefulness, setup, help, and maintainers.
|
|
Keep agent instructions in this file. Put detailed usage, development notes, and
|
|
product plans in `docs/`, with links from the README.
|
|
Keep the roadmap visual and organized around goals, user outcomes, and milestones.
|
|
Keep detailed capability lists and design constraints in the product scope reference.
|
|
|
|
## Kanban workflow
|
|
|
|
Move implementation-ready cards to Review after the relevant checks pass.
|
|
Reserve Done for the user's acceptance. Automated checks do not replace that review.
|
|
Keep unresolved work In progress. Do not start blocked cards or cards outside the requested scope.
|
|
|
|
## Versioning
|
|
|
|
Apply this policy to RuneStone and its plugins. Each project keeps its own version number.
|
|
Use `zz.yy.xx`. Keep routine implementation work in the current `zz.yy` series.
|
|
Increase `xx` once for each new completed build. The number has no two-digit limit.
|
|
Keep the current version during source edits, fixes, improvements, documentation work, and automated checks.
|
|
A build means a RuneStone installer or a plugin ZIP, unless the user requests another distributable.
|
|
Development servers, test runs, and intermediate compilation output do not count as new builds.
|
|
Set the next version when producing the build. Keep all version fields consistent.
|
|
If no build completes, restore the previous version fields. Failed attempts and retries do not consume version numbers.
|
|
Report a new version as available only after its build artifact exists.
|
|
Publishing an existing artifact does not increase its version.
|
|
Increase `yy` only for a deliberate release ready for build testing, with user direction. Reset `xx` to zero for that release.
|
|
Increase `zz` only for a full release, with user direction. Reset `yy` and `xx` to zero for that release.
|
|
Passing automated checks alone does not authorize a `yy` or `zz` increase.
|
|
Keep version fields consistent within each project. Do not increase versions for instruction-only edits.
|
|
|
|
Use lowercase letter suffixes for hotfix release labels, such as `0.2.11a` and `0.2.11b`.
|
|
Where packaging requires numeric versions, use letters in release labels or tags until that package format supports suffixes.
|
|
For those packages, increase `xx` for each changed hotfix build and record its numeric version in the release notes.
|
|
The current plugin contract requires numeric versions in `plugin.json`. Do not bypass its validator or overwrite an existing release ZIP.
|
|
|
|
See [versioning for plugin authors and agents](docs/plugins.md#versioning-for-plugin-authors-and-agents) for the package guidance.
|
|
|
|
## Windows installer
|
|
|
|
- Default to reinstall when RuneStone is already installed, including builds with the same version.
|
|
- Do not make users uninstall RuneStone before they can reinstall or update it.
|
|
- Preserve workspace files and user settings during reinstall and update.
|
|
- Keep the existing protection against version downgrades.
|
|
|
|
## Plugin packages
|
|
|
|
Use `docs/plugins.md` as the package and release reference for all plugin work.
|
|
Distribute one standard `.zip` per plugin, with `plugin.json` at the archive root.
|
|
Use `pnpm package:plugin <compiled-folder> [output-folder]` to create release files.
|
|
Use Settings → Plug-ins for local ZIP and experimental Gitea-link installation.
|
|
Do not introduce custom extensions, loose JSON installation, or folder installation instructions.
|
|
Keep the manifest and entry module readable. Include the assets and dependencies needed to run the plugin.
|
|
Follow the Gitea release standard in `docs/plugins.md`: one plugin ZIP per published release, with an explicit tag for prerelease trials.
|
|
Keep the download source separate from package validation and installation.
|
|
GitHub and GitLab adapters remain future work. Do not add untested host support.
|
|
|
|
## UI work: prefer meaningful icons
|
|
|
|
Apply these rules whenever designing, implementing, modifying, or reviewing RuneStone UI.
|
|
Apply them automatically without requiring the user to repeat them.
|
|
|
|
- Favor recognizable icons for actions, navigation, menus, and settings categories.
|
|
Help users recognize functions without relying only on English vocabulary.
|
|
Use icons to save space and reduce clutter.
|
|
- Pair icons with concise visible labels when the meaning could be ambiguous.
|
|
Keep labels that help users learn or distinguish functions.
|
|
- Use icon-only controls for familiar actions in compact spaces.
|
|
Give them accessible names, tooltips on hover and keyboard focus, and comfortable click targets.
|
|
- Reuse existing icon components and artwork. Keep the same icon for the same function.
|
|
Maintain consistent sizing and stroke weight.
|
|
- Do not force icons onto every setting, label, or explanation.
|
|
Use text alone when no clear icon exists. Omit decoration that does not improve understanding.
|
|
Recognition and accessibility take priority over fitting more controls on screen.
|
|
- Use Obsidian's settings pattern as a reference: icons with labels in navigation,
|
|
readable text and ordinary controls in detailed settings.
|
|
|
|
For UI reviews, check changed controls against these rules.
|
|
|
|
## UI work: use rounded corners
|
|
|
|
Apply these rules whenever designing, implementing, modifying, or reviewing RuneStone UI.
|
|
Apply them automatically without requiring the user to repeat them.
|
|
|
|
- Use rounded corners consistently for controls and navigation highlights, including file and folder selections.
|
|
Compact controls and navigation rows share `--rs-control-radius`.
|
|
Selection outlines use `--rs-item-selection-radius`.
|
|
- Round exposed selection corners while keeping adjacent selected rows joined.
|
|
Do not add rounded gaps or selection borders on shared edges.
|
|
- Apply the same treatment to hover, active, and selected navigation states.
|
|
- Tables inside documents are the exception: keep grids, cells, and cell selection outlines square.
|
|
Table toolbar and menu controls still use rounded corners.
|
|
|
|
## UI work: outline only the outer boundary of a selection
|
|
|
|
Apply these rules whenever designing, implementing, modifying, or reviewing selection UI.
|
|
Apply them automatically without requiring the user to repeat them.
|
|
|
|
- Adjacent selected rows or cells share one highlighted region.
|
|
Highlight only its exposed perimeter. Omit selection borders on shared internal edges.
|
|
Apply this to navigation rows, table cells, lists, and grids.
|
|
- Use the shared `--rs-item-selection-*` theme values for fill, border color, and border width.
|
|
Use table-cell selection as the fill and outline reference, with rounded exposed corners outside document tables.
|
|
- Separate groups, divided by unselected items or physical gaps, retain separate outlines.
|
|
A single selected item gets a complete outline.
|
|
- Determine adjacency from visible layout order, including sorting and expanded tree branches.
|
|
At indentation changes, preserve exposed edges and omit the portions shared by selected rows.
|
|
- Keep the fill continuous within each selected region.
|
|
Ordinary table grid lines can remain, but must not become highlighted selection borders inside the region.
|
|
- Check single items, contiguous ranges, separated selections, and nested rows.
|
|
|
|
## UI work: use one menu design
|
|
|
|
Apply these rules to context menus, action menus, and their submenus.
|
|
Apply them automatically when you add, change, or review a menu.
|
|
|
|
- Use `src/lib/ui/actionMenu.ts` for action menus.
|
|
Svelte callers can use `src/lib/layout/ContextMenu.svelte`.
|
|
Keep presentation in `src/lib/ui/menu.css` and theme values in `src/lib/theme/tokens.css`.
|
|
Do not create a separate menu renderer or local style overrides for individual features.
|
|
- Use the same font, row height, padding, icon size, label alignment, separators, and shadow throughout a menu family.
|
|
Use `--rs-menu-*` tokens and `--rs-control-radius`.
|
|
Keep a padding inset around every row so hover and focus backgrounds do not touch the panel border.
|
|
Menu width can change when content requires more space. Keep the other shared measurements.
|
|
- Use the same action icon for the same function across menus.
|
|
Give recognizable actions an icon and a concise label.
|
|
Reserve the icon column when an item has no suitable icon.
|
|
Keep submenu arrows and shortcut text in separate trailing columns.
|
|
- Give enabled rows the same hover and keyboard focus treatment.
|
|
Keep disabled rows readable, skip them during keyboard navigation, and prevent their activation.
|
|
Use the same inset separators between related groups.
|
|
- Support arrow keys, Home, End, Enter, Space, and Escape.
|
|
Open submenus with the Right arrow and return with the Left arrow.
|
|
Restore focus on keyboard dismissal. Keep menus within the viewport and scroll long menus.
|
|
- Check file, folder, pane, tab, editor, table, and submenu examples after changes to shared menu code.
|
|
Check both themes, disabled items, icon alignment, keyboard focus, and viewport edges.
|
|
Run `scripts/menuConsistency.smoke.mjs` against the development server to compare shared styles and behavior.
|
|
|
|
Rich pickers and dialogs can use their own layouts when they contain search fields, descriptions, or forms.
|
|
Plugin menus should use these rules where the host API permits shared components.
|