When the user proposes a new feature, follow this workflow where executable tests specify behavior and types + doc comments specify technical design:
Write natural language Gherkin scenarios and iterate with the user:
Given a source file with a file link