195 lines
13 KiB
Markdown
195 lines
13 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 regular build. The number has no two-digit limit.
|
|
For a hotfix build, keep `zz.yy.xx` and increase only its lowercase letter suffix.
|
|
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.
|
|
|
|
A hotfix fixes a single item or a narrowly scoped problem in an existing release.
|
|
Use lowercase letter suffixes as the actual hotfix version, such as `0.2.28a` and `0.2.28b`.
|
|
Advance hotfix suffixes in this order: `a`, `b`, `c`, through `z`, then `aa`, `ab`, and later suffixes.
|
|
The next regular build increases `xx` and removes the suffix.
|
|
Use the same hotfix version in `package.json`, `plugin.json`, build metadata, ZIP names, release notes, and tags.
|
|
For installer toolchains that require numeric or SemVer fields, use the reversible encoding in [the build guide](docs/builds.md#hotfix-installer-versions).
|
|
Keep the literal hotfix version in release metadata, visible version strings, and artifact names.
|
|
Do not substitute a numeric build increment for a hotfix suffix.
|
|
If a package format rejects the suffix, add support or report the blocker before building.
|
|
Do not bypass validation 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 shared dimensions
|
|
|
|
Use `--rs-titlebar-height` for custom window headers in the main app and settings.
|
|
Use the shared `--rs-settings-*` tokens for settings spacing, control height, headings, and descriptions.
|
|
Keep related plugin metadata and actions in compact rows. Preserve readable labels, focus indicators, and comfortable click targets.
|
|
Wrap controls at narrow widths and scroll the content area. Long settings navigation must leave room for the selected settings.
|
|
Check both themes, narrow windows, and long plugin lists after changes to shared dimensions.
|
|
## 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.
|
|
|
|
## Project Management skill
|
|
|
|
For RuneStone boards and cards, use the global `runestone-project-management` skill.
|
|
Find it at `$CODEX_HOME/skills/runestone-project-management/SKILL.md`.
|
|
When `CODEX_HOME` is unset, use `~/.codex/skills/runestone-project-management/SKILL.md`.
|
|
The skill supports multiple boards and workspaces with a read-only helper.
|
|
Discover boards before task selection when the request does not identify a board.
|
|
Each plugin has its own board. Use board membership to select the project, not tags or labels.
|
|
Use board placement to select a list. Card status alone does not identify its list.
|
|
Read priority from the separate `runestone_pm.priority` detail field, never from labels or tags.
|
|
|
|
## UI work: keep attention on the work
|
|
|
|
Use the principles in [Interface design](docs/ui-design.md#design-principles) for all interface work.
|
|
Use quiet active states. Reserve strong borders and accents for controls that need attention.
|
|
Show board and view names once where possible. Keep switching and renaming as separate actions.
|
|
Use familiar icons and visual previews. Keep labels when they prevent ambiguity.
|
|
Keep accessible names, keyboard focus, and tooltips on icon controls.
|
|
Keep optional forms hidden until needed. Let users collapse sections and hide panes to focus on their work.
|
|
Before adding a control, check the shared component and examples in `docs/ui-design.md`.
|
|
|
|
## UI work: record design decisions
|
|
|
|
Use [Interface design](docs/ui-design.md) as the current design reference for the app and its plugins.
|
|
Use the [design decision log](docs/design-decisions.md) for rule changes, recurring problems, and exceptions.
|
|
|
|
- For an isolated correction, keep the normal card or commit record. Do not add a design entry.
|
|
- For a rule change, update the guide and add a rule-change entry in the same change.
|
|
Record the reason, scope, shared component or token, and evidence. The number of affected controls does not determine the category.
|
|
- For a recurring problem, link the occurrences and record the cause and prevention check.
|
|
Mark an unknown cause as unknown. Update an existing entry for the same problem instead of adding duplicate entries.
|
|
Clarify the guide only when its rule is missing or unclear.
|
|
- For an exception, record the user benefit, exact scope, and review date or trigger.
|
|
Link the exception from the relevant guide section. An entry does not authorize a departure from the current rule.
|
|
- Before moving UI work to Review, include the evidence required by the guide.
|
|
Identify the shared component or token, check local overrides, and record any gaps in checks.
|
|
Check design principles as well as styling. Keep unresolved work In progress and reserve Done for the user's acceptance.
|