Skip to content

feat: generate skills to workspace root with composable naming and YAML frontmatter#775

Merged
pyramation merged 4 commits intomainfrom
devin/1772607063-skills-workspace-root
Mar 4, 2026
Merged

feat: generate skills to workspace root with composable naming and YAML frontmatter#775
pyramation merged 4 commits intomainfrom
devin/1772607063-skills-workspace-root

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Mar 4, 2026

feat: generate skills to workspace root with composable naming

Summary

Refactors codegen skill generation to output skills to the workspace root skills/ directory (instead of nested inside each generator’s output like orm/skills/, hooks/skills/, cli/skills/), using Agent Skills format (SKILL.md + YAML frontmatter) and composable naming to avoid collisions across targets and generator types.

Skills generation is controlled via docs.skills (default false).

Key changes:

  • New workspace.ts: findWorkspaceRoot() walks up from the output dir looking for pnpm-workspace.yamllerna.jsonpackage.json with workspaces → nearest package.json
  • Config:
    • docs.skills?: boolean (default false) gates skill generation
    • Optional skillsPath?: string on GraphQLSDKConfigTarget to override the output directory; otherwise uses {workspaceRoot}/skills/
  • Composable naming (collision-proof across generator types + targets):
    • ORM: orm-{target}-{entity}/SKILL.md
    • Hooks: hooks-{target}-{entity}/SKILL.md
    • CLI: cli-{target}-{entity}/SKILL.md (plus cli-context/ and cli-auth/ for infra)
  • YAML frontmatter: all skill files include:
    ---
    name: ...
    description: ...
    ---

Updates since last revision

  • Removed automatic deletion of any “old nested” skill directories (orm/skills, hooks/skills, cli/skills). No migration/cleanup behavior is performed by the generator.

Review & Testing Checklist for Human

  • CLI naming collision risk: table skills and custom operation skills both use cli-{target}-{kebab}. If a table and operation share the same kebab-cased name, one will overwrite the other. Consider disambiguating (e.g. cli-{target}-table-{kebab} vs cli-{target}-op-{kebab}).
  • docs.skills toggle behavior: confirm skills are only generated when docs.skills: true and default behavior (omitted) does not emit skills.
  • Single-target targetName defaults to 'default': when generate() is called directly (not via generateMulti), skills are named *-default-{entity}. Confirm this is desired vs inferring from config.
  • No stale skill pruning: skills are written with pruneStaleFiles: false (removed entities leave orphan skill dirs). Confirm this is intentional.
  • Run real SDK generation (e.g. pnpm generate:sdk) and confirm:
    • skills land in {workspaceRoot}/skills/ (or skillsPath), not under src/**
    • YAML frontmatter + naming conventions match expectations
    • if you previously generated nested skill dirs, you may need to delete those manually

Recommended test plan: run the SDK generation script(s) that your release process uses and inspect the resulting {workspaceRoot}/skills/ directory for naming, frontmatter, and collisions.

Notes

…ML frontmatter

- Add findWorkspaceRoot() utility (pnpm-workspace.yaml, lerna.json, package.json workspaces)
- Add skillsPath config option for explicit override
- Remove docs.skills from DocsConfig (skills now auto-generate)
- Update buildSkillFile() to emit YAML frontmatter (name, description)
- Update ORM skills: orm-{target}-{entity}/SKILL.md
- Update hooks skills: hooks-{target}-{entity}/SKILL.md
- Update CLI skills: cli-{target}-{entity}/SKILL.md + cli-context, cli-auth
- Refactor generate()/generateMulti() to write skills to workspace root
- Clean up old nested skills dirs after writing
- Update SDK/React generation scripts to remove docs.skills
- Fix test expectations for resolveDocsConfig
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit ea714e9 into main Mar 4, 2026
43 checks passed
@pyramation pyramation deleted the devin/1772607063-skills-workspace-root branch March 4, 2026 11:40
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