Skip to content

fix: scope facility doctor agent checks to YAML frontmatter - #342

Open
o-mid wants to merge 1 commit into
theam:mainfrom
o-mid:fix/doctor-frontmatter-scope
Open

fix: scope facility doctor agent checks to YAML frontmatter#342
o-mid wants to merge 1 commit into
theam:mainfrom
o-mid:fix/doctor-frontmatter-scope

Conversation

@o-mid

@o-mid o-mid commented Sep 8, 2026

Copy link
Copy Markdown

Addresses doctor false pass and false fail against the 0.12 agent contract.

facility doctor applied name, model, trigger, and forbidden-key regexes to the whole agent file. Prompt text such as a GitHub permissions: example failed the check, and a wrong frontmatter name: could be hidden by repeating the expected name in the prompt. Quoted model ids with spaces also failed.

Doctor now splits YAML frontmatter from the prompt, accepts mcp and ui triggers (already valid at runtime), and accepts quoted model scalars.

Test plan

  • pnpm --filter @theagilemonkeys/facility test
  • CLI suite 10 consecutive passes
  • Confirm a prompt that contains permissions: still passes
  • Confirm frontmatter permissions: still fails
  • Confirm name: builder only in the prompt does not satisfy builder.md
  • Confirm model: "gpt-5.6-sol with spaces" passes
  • Confirm an agent with only mcp and ui triggers passes

Doctor was matching name, model, triggers, and forbidden keys across the
prompt body, so a valid prompt could fail and a wrong frontmatter name
could hide behind a line in the prompt.
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.

1 participant