kitops icon indicating copy to clipboard operation
kitops copied to clipboard

Feature Request: Treat `*.prompt*` files as code in init command

Open gorkem opened this issue 2 months ago • 5 comments

Current Behavior The kit init command categorizes files based on extension only. A file like my.prompt.md gets treated as a markdown file rather than prompt code.

Desired Behavior Any file matching the pattern *.prompt* should be automatically categorized as code during kit init, regardless of additional extensions.

Rationale Prompts are code. The pattern *.prompt* provides clear semantic meaning while allowing flexibility in tooling:

  • system.prompt.md - system prompts with markdown formatting
  • query.prompt.txt - plain text prompts
  • template.prompt.jinja - templated prompts
  • config.prompt.yaml - structured prompt configs

This aligns with emerging patterns in prompt engineering where prompts are treated as first-class code artifacts with their own testing, versioning, and distribution requirements.

Examples Files that should be treated as code:

  • instruction.prompt.md
  • system.prompt
  • user.prompt.txt
  • chain.prompt.yaml

Implementation Note Pattern matching should be substring match on .prompt. or .prompt suffix, not regex wildcards, to avoid false positives.

gorkem avatar Oct 03 '25 12:10 gorkem

hi @gorkem can i work on this issue? /assign

Deepam02 avatar Oct 03 '25 13:10 Deepam02

Are you participating at hacktoberfest?

gorkem avatar Oct 03 '25 13:10 gorkem

Yes I am participating in hacktoberfest this issue would be a good opportunity for me

Deepam02 avatar Oct 03 '25 14:10 Deepam02

If no one else is currently working on this, I’d like to take it up. I am planning to add a check for .prompt in the determineFileType function.

cr3ativ3cod3r avatar Nov 06 '25 16:11 cr3ativ3cod3r

@cr3ativ3cod3r Iam not aware of any ongoing work on this.

gorkem avatar Nov 07 '25 15:11 gorkem