Skip to content

feat(codegen): auto-generate skills docs with INPUT_OBJECT dot-notation, semantic types, and --no-tty#786

Open
pyramation wants to merge 1 commit intomainfrom
devin/1772752266-cli-codegen-improvements
Open

feat(codegen): auto-generate skills docs with INPUT_OBJECT dot-notation, semantic types, and --no-tty#786
pyramation wants to merge 1 commit intomainfrom
devin/1772752266-cli-codegen-improvements

Conversation

@pyramation
Copy link
Contributor

feat(codegen): auto-generate docs with INPUT_OBJECT dot-notation and --no-tty

Summary

Updates the codegen docs generators so that generated agent skills, READMEs, and MCP tool definitions automatically reflect INPUT_OBJECT dot-notation flattening and --no-tty non-interactive mode — no hand-editing of skill files needed.

Core change: Added flattenArgs(args, registry?) and resolveInputFields() helpers in docs-utils.ts that resolve INPUT_OBJECT types from the TypeRegistry (since CleanTypeRef intentionally omits inputFields to avoid circular references). All 8 docs generator functions (generateReadme, generateAgentsDocs, getCliMcpTools, generateSkills + their multi-target variants) now accept an optional TypeRegistry and pass it through to flattenArgs.

Before: csdk sign-in --input <value>
After: csdk sign-in --input.clientMutationId <value> --input.email <value> --input.password <value> --input.rememberMe <value> ...

Also adds --no-tty documentation sections to all generated READMEs and SKILL.md files.

Files changed (source):

  • docs-utils.ts — new flattenArgs(), flattenedArgsToFlags(), resolveInputFields() helpers
  • docs-generator.ts — all 8 generators accept TypeRegistry, use flattened args, add --no-tty docs
  • generate.ts — threads customOperations.typeRegistry to CLI docs calls; merges registries for multi-target
  • 4 test snapshots updated
  • ~60 regenerated skill reference files + READMEs

Review & Testing Checklist for Human

  • clientMutationId noise: Every flattened INPUT_OBJECT now shows --input.clientMutationId as the first flag in usage/examples. This is technically correct but clutters docs since most users never pass it. Consider whether clientMutationId should be filtered out in flattenArgs().
  • TypeRegistry merging in multi-target (generate.ts): The combined registry uses simple Map.set() so later targets overwrite earlier ones on name collision. Verify this is safe given your schema structure (should be fine if type names are globally unique).
  • Long usage lines in skill references: Commands with many input fields (e.g. set-and-commit with 8 fields) produce very long single-line usage strings. Check if this is acceptable for agent consumption or if truncation/reformatting is needed.
  • Run pnpm run generate in constructive-cli after merge to confirm the regenerated output matches expectations against the latest schema.

Notes

  • Requested by @pyramation
  • Devin Session
  • This PR does NOT change any CLI runtime behavior — only the generated documentation (skills, READMEs, AGENTS.md, MCP tools).
  • All 301 tests pass, 4 snapshots updated.
  • Cannot test end-to-end: Generated docs look correct but the actual CLI behavior with flattened flags (--input.email etc.) requires a running backend to verify. CI checks compile/lint only.

@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

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