Skip to content

feat: create and browse rules and memory, not just skills - #36

Merged
Railly merged 1 commit into
mainfrom
feat/rules-mvp
Jul 24, 2026
Merged

feat: create and browse rules and memory, not just skills#36
Railly merged 1 commit into
mainfrom
feat/rules-mvp

Conversation

@Railly

@Railly Railly commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Closes #26. The Rules MVP, built on the .mdc scan fix (#35).

Per the shaping decisions: rules-first MVP, shared scaffold, AGENTS.md-aware where relevant.

What ships

  • Create rules and memory from the UI. Obsidian's create wizard used to hard-exclude rule/memory types (if (sp.type === "rule" || sp.type === "memory") continue;). Removed. You can now scaffold a Cursor .mdc rule, a Windsurf/Codex memory file, etc.
  • Correct .mdc format on create. New src/scaffolds.ts is the single source of truth for scaffold bodies + extensions, shared by both frontends (they used to duplicate near-identical strings). A rule gets .mdc with description/globs/alwaysApply frontmatter; memory gets a plain body; skills keep SKILL.md. scaffoldExtension picks .mdc for Cursor rules, .md otherwise.
  • Typed rule fields. SkillItem gains globs?: string and alwaysApply?: boolean, promoted from .mdc frontmatter in the scanner (array globs normalized to a comma string), kept in the raw bag too.
  • Memories filter. Obsidian's sidebar hardcoded Skills/Commands/Agents/Rules and omitted Memory; added, shown only when memory items exist.

Deliberately deferred (v2, not this PR)

  • Structured .mdc metadata editor (glob-list control, alwaysApply toggle) — for now globs/alwaysApply are edited as raw frontmatter in the file
  • Modeling CLAUDE.md / AGENTS.md root files as scannable memory (the biggest remaining gap) — needs its own tool-configs work
  • The AGENTS.md-sidecar internal representation for cross-agent export — relevant once export lands

Implementation

Written by Codex (gpt-5.6-sol), reviewed line by line.

Verification

  • bun run build + bun run lint + vscode tsc --noEmit: all clean (re-run by me, not just Codex's report)
  • Scaffold outputs checked: rule → .mdc with the three frontmatter keys, memory → .md, skill → SKILL.md, command → .md
  • Full round-trip proven: a rule created through the shared scaffold writes ts-strict.mdc; re-scanning surfaces globs: "**/*.ts" and alwaysApply: true as typed fields
  • vsix packaged and installed into VS Code and Cursor

Rules MVP. Builds on the .mdc scan fix (#35).

- src/scaffolds.ts: shared scaffold module for both frontends. Rule
  files get .mdc frontmatter (description, globs, alwaysApply); memory
  gets a plain body; skills keep SKILL.md. scaffoldExtension picks
  .mdc for Cursor rules, .md otherwise. Replaces the near-identical
  hand-rolled strings the two frontends used to duplicate.
- src/types.ts + scanner.ts: SkillItem gains typed globs and
  alwaysApply, promoted from .mdc frontmatter (array globs normalized
  to comma string), kept in the frontmatter bag too.
- create-skill-modal.ts (Obsidian): drops the exclusion that blocked
  creating rule/memory files, adds scroll/database type icons, uses
  the shared scaffold with the correct extension.
- parity.ts (VS Code): create flow uses the shared scaffold and
  extension.
- sidebar.ts (Obsidian): adds the Memories filter row (was omitted;
  only shows when memory items exist).

Implemented by Codex (gpt-5.6-sol), reviewed line by line.

Verified: build + eslint + vscode tsc all clean. Scaffold outputs
checked (rule -> .mdc with globs/alwaysApply, memory -> .md, skill ->
SKILL.md). Full round-trip proven: a rule created via the shared
scaffold writes ts-strict.mdc, and re-scanning surfaces globs
'**/*.ts' and alwaysApply true as typed fields. vsix installed into
VS Code and Cursor.
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenfiles-web Ready Ready Preview, Comment Jul 24, 2026 8:06pm

@Railly
Railly merged commit 5e8a20c into main Jul 24, 2026
4 checks passed
@Railly
Railly deleted the feat/rules-mvp branch July 24, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Rules management (browse and edit rules across tools)

1 participant