mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 23:01:56 +00:00
Centralize frontmatter parsing + parse frontmatter with yaml library (#728)
* Add frontmatter utility and tidy coding agent prompts * Add frontmatter parsing utilities and tests * Parse frontmatter with YAML parser * Simplify frontmatter parsing utilities * strip body in 1 place * Improve frontmatter parsing error handling * Normalize multiline skill and select-list descriptions
This commit is contained in:
parent
df58d3191e
commit
ce7e73b503
14 changed files with 213 additions and 126 deletions
8
packages/coding-agent/test/fixtures/skills/invalid-yaml/SKILL.md
vendored
Normal file
8
packages/coding-agent/test/fixtures/skills/invalid-yaml/SKILL.md
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: invalid-yaml
|
||||
description: [unclosed bracket
|
||||
---
|
||||
|
||||
# Invalid YAML Skill
|
||||
|
||||
This skill has invalid YAML in the frontmatter.
|
||||
11
packages/coding-agent/test/fixtures/skills/multiline-description/SKILL.md
vendored
Normal file
11
packages/coding-agent/test/fixtures/skills/multiline-description/SKILL.md
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
name: multiline-description
|
||||
description: |
|
||||
This is a multiline description.
|
||||
It spans multiple lines.
|
||||
And should be normalized.
|
||||
---
|
||||
|
||||
# Multiline Description Skill
|
||||
|
||||
This skill tests that multiline YAML descriptions are normalized to single lines.
|
||||
Loading…
Add table
Add a link
Reference in a new issue