Skip to content

feat: add frontmatter readonly mode for module descriptors#26

Merged
cuzfrog merged 2 commits into
mainfrom
ISSUE-13_readonly-mode
May 24, 2026
Merged

feat: add frontmatter readonly mode for module descriptors#26
cuzfrog merged 2 commits into
mainfrom
ISSUE-13_readonly-mode

Conversation

@cuzfrog
Copy link
Copy Markdown
Owner

@cuzfrog cuzfrog commented May 24, 2026

Summary

Adds frontmatter option to moduleDescriptorReadonly config (alongside file and off).

In frontmatter mode, the module descriptor file is listed as readonly but only frontmatter edits are blocked — body/prose editing is allowed.

Options:

  • file (= true): entire descriptor file is readonly (existing behavior)
  • frontmatter: only frontmatter is readonly, body can be edited
  • off (= false): no protection

Changes:

  • src/config.ts: change type from boolean to "file" | "frontmatter" | "off" with backward compat
  • src/index.ts: check if edits modify frontmatter only in frontmatter mode
  • src/graph/module-index-builder.ts: accept new type
  • src/context/system-prompt.ts: update system prompt hint for all three modes
  • Tests: new behavior test file for frontmatter mode, updated config/unit tests

Closes #13

cuzfrog added 2 commits May 24, 2026 11:30
Adds 'frontmatter' option to moduleDescriptorReadonly (alongside 'file' and 'off').
In 'frontmatter' mode, the module descriptor file is listed as readonly but
only frontmatter edits are blocked — body/prose editing is allowed.

Backward compatible: true/false in settings.json are normalized to 'file'/'off'.

Closes #13
@cuzfrog cuzfrog merged commit 519d2f2 into main May 24, 2026
1 check passed
@cuzfrog cuzfrog deleted the ISSUE-13_readonly-mode branch May 24, 2026 15:31
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.

Option for module descriptor readonly mode

1 participant