Skip to content

feat: consolidate skills into single-per-API with references/ subdirectories#780

Merged
pyramation merged 2 commits intomainfrom
devin/1772624566-remove-nested-sdk-skills
Mar 4, 2026
Merged

feat: consolidate skills into single-per-API with references/ subdirectories#780
pyramation merged 2 commits intomainfrom
devin/1772624566-remove-nested-sdk-skills

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Mar 4, 2026

feat: consolidate skills into single-per-API with references/ subdirectories

Summary

Follow-up to PR #775. Restructures the generated skill output from 486 individual per-entity skill directories into ~8 consolidated skills (one per API), each with entity documentation in a references/ subdirectory.

Before (486 dirs)

skills/
  orm-public-field/SKILL.md
  orm-public-database/SKILL.md
  hooks-admin-app-grant/SKILL.md
  ...  (486 total)

After (8 dirs)

skills/
  orm-public/
    SKILL.md              ← overview with YAML frontmatter + References section
    references/
      field.md            ← entity-specific docs (no frontmatter)
      database.md
      ...
  orm-admin/
    SKILL.md
    references/...
  hooks-public/
    SKILL.md
    references/...
  hooks-admin/
    SKILL.md
    references/...
  ...

Codegen changes

  • docs-utils.ts: Added SkillReferenceDefinition interface and buildSkillReference() helper for reference file generation. Updated buildSkillFile() to accept optional referenceNames and emit a ## References section with links.
  • orm/docs-generator.ts: Rewrote generateOrmSkills() — emits one orm-{target}/SKILL.md + per-entity reference files in references/.
  • hooks-docs-generator.ts: Rewrote generateHooksSkills() — same pattern as ORM.
  • cli/docs-generator.ts: Rewrote both generateSkills() (single-target → cli-{target}/ with context/auth/table/op references) and generateMultiTargetSkills() (emits cli-common/ for shared context/auth + cli-{target}/ per target).
  • Test snapshots: Updated 15 snapshots, wrote 3 new ones. All 283 tests pass.

Review & Testing Checklist for Human

  • Verify reference file format: Open a few skills/*/references/*.md files and confirm they have NO YAML frontmatter (just # Title + content), while skills/*/SKILL.md files DO have ---\nname:\ndescription:\n--- frontmatter.
  • Cross-target entity leakage: The orm-public skill's references include entities from the objects target (e.g., freeze-objects.md, get-all-record.md, store.md). This happens because the public GraphQL schema includes objects tables. Confirm this is expected or whether objects entities should only appear in orm-objects.
  • Spot-check the References section: Open skills/orm-public/SKILL.md and verify the ## References section at the bottom has working relative links to all reference files (e.g., [field](references/field.md)).
  • CLI multi-target naming: The multi-target CLI generator now produces cli-common/ (shared context/auth) + cli-{target}/ per target. Confirm this naming convention is acceptable.
  • Regeneration determinism: Run cd sdk/constructive-sdk && npx tsx scripts/generate-sdk.ts && cd ../constructive-react && npx tsx scripts/generate-react.ts locally — there should be no diff after re-running.

Notes

  • The 2 test suite failures (schema-only.test.ts, expand-targets.test.ts) are pre-existing pgsql-seed module resolution issues, unrelated to this PR.
  • The full workspace pnpm build has a pre-existing failure in pgsql-client. The codegen package builds cleanly after running cd postgres/pgsql-seed && pnpm build first.
  • Reference files intentionally lack YAML frontmatter per Agent Skills conventions — they're documentation, not standalone skills.

Link to Devin Session: https://app.devin.ai/sessions/56210b5075d14c03abb8d475e781b23e
Requested by: @pyramation

@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

…ctories

- Update ORM, hooks, and CLI skill generators to emit one skill per API
  (e.g. orm-public, hooks-admin) with entity docs in references/
- Add buildSkillReference() helper for reference file generation
- Update buildSkillFile() to accept referenceNames and generate References section
- Delete 486 old per-entity skill directories
- Regenerate SDK and React SDK with new consolidated structure
- Update test assertions and snapshots for new structure
@devin-ai-integration devin-ai-integration bot changed the title chore: delete nested SDK skills and regenerate to workspace-root skills/ feat: consolidate skills into single-per-API with references/ subdirectories Mar 4, 2026
@pyramation pyramation merged commit 8a79d8d into main Mar 4, 2026
43 checks passed
@pyramation pyramation deleted the devin/1772624566-remove-nested-sdk-skills branch March 4, 2026 12:19
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