Skip to content

fix: keep mindmodel constraint files on the .md extension (#58) - #99

Open
vtemian wants to merge 1 commit into
mainfrom
fix/mindmodel-markdown-extensions
Open

fix: keep mindmodel constraint files on the .md extension (#58)#99
vtemian wants to merge 1 commit into
mainfrom
fix/mindmodel-markdown-extensions

Conversation

@vtemian

@vtemian vtemian commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Closes #58.

Problem

/mindmodel generated constraint files ending in .yaml instead of .md. Reported against qwen3.6 35b.

The generator prompt was not actually wrong, which is why this is easy to miss: its <output-structure> block lists every constraint file with a .md extension and only manifest.yaml as YAML. But the rule was only ever implied by that listing. Sitting right beside it is a <manifest-format> block containing a yaml code fence, and a weaker model reads that as licence to write the whole directory as YAML.

Fix

Two parts, because prompt wording alone is not verifiable.

Say the rule outright. <rules> now states that manifest.yaml is the only YAML file and names the exact mistake, rather than leaving it to be inferred from a directory diagram.

Report it when it happens anyway. The loader now names any category path that is not .md:

[mindmodel] Constraint files must end in .md: stack/frontend.yaml, patterns/logging.yml

Deliberately a warning, not a parse failure. A wrong extension leaves the directory inconsistent rather than broken, since the file still loads by its declared path. Failing the manifest would discard an otherwise usable mindmodel over a naming problem, and the project's own guidance is to treat parse issues as non-fatal where possible.

Verification

490 tests pass (was 488). Two new cases: one asserting the warning names only the offending paths while the manifest still loads with all three categories intact, one asserting silence when every path is .md.

Mutation-checked: removing the warnNonMarkdownCategories call fails the first test.

The prompt change itself is not testable here, since it depends on model behaviour. The loader warning is what makes a bad generation visible rather than silent.

/mindmodel sometimes emitted stack/frontend.yaml instead of .md. The
generator prompt only implied the rule through its directory listing, so
weaker models read manifest.yaml as licence to write every file as YAML.

State the rule outright, and have the loader name any category path that
is not .md. The manifest still loads: a wrong extension leaves the
directory inconsistent rather than broken, so it does not justify
discarding the whole mindmodel.

Closes #58
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

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.

.mindmodel content files end with yaml but should be md

1 participant