The CLI tool crashes with an unhandled ENOENT error if the expected DESIGN.md file is not present in the current working directory. Instead of crashing with a stack trace, the tool should ideally look for a default file, create one, or output a user-friendly error message explaining how to initialize or provide the missing file.Steps to ReproduceRun the tool via npx (or globally) in a directory that does not contain a DESIGN.md file.Observe the unhandled file read error crash.Expected BehaviorThe tool should gracefully handle the missing file by either:Prompting the user to create a DESIGN.md file.Automatically generating a template DESIGN.md file.Providing a clear error message (e.g., "Error: DESIGN.md not found. Please create this file or specify a path.") instead of dumping a Node.js stack trace.Environment & Stack TraceTool: @google/design.mdError Log:json{
"error": "FILE_READ_ERROR",
"message": "ENOENT: no such file or directory, open 'DESIGN.md'",
"path": "DESIGN.md"
}
Use code with caution.textERROR ENOENT: no such file or directory, open 'DESIGN.md'
at readFileSync (node:fs:441:20)
at readInput (.npm/_npx/9cb06364208d5c89/node_modules/@google/design.md/dist/index.js:24123:12)
at Object.run (.npm/_npx/9cb06364208d5c89/node_modules/@google/design.md/dist/index.js:24260:28)
at runCommand (.npm/_npx/9cb06364208d5c89/node_modules/@google/design.md/dist/index.js:23969:26)
The CLI tool crashes with an unhandled ENOENT error if the expected DESIGN.md file is not present in the current working directory. Instead of crashing with a stack trace, the tool should ideally look for a default file, create one, or output a user-friendly error message explaining how to initialize or provide the missing file.Steps to ReproduceRun the tool via npx (or globally) in a directory that does not contain a DESIGN.md file.Observe the unhandled file read error crash.Expected BehaviorThe tool should gracefully handle the missing file by either:Prompting the user to create a DESIGN.md file.Automatically generating a template DESIGN.md file.Providing a clear error message (e.g., "Error: DESIGN.md not found. Please create this file or specify a path.") instead of dumping a Node.js stack trace.Environment & Stack TraceTool: @google/design.mdError Log:json{
"error": "FILE_READ_ERROR",
"message": "ENOENT: no such file or directory, open 'DESIGN.md'",
"path": "DESIGN.md"
}
Use code with caution.textERROR ENOENT: no such file or directory, open 'DESIGN.md'
at readFileSync (node:fs:441:20)
at readInput (.npm/_npx/9cb06364208d5c89/node_modules/@google/design.md/dist/index.js:24123:12)
at Object.run (.npm/_npx/9cb06364208d5c89/node_modules/@google/design.md/dist/index.js:24260:28)
at runCommand (.npm/_npx/9cb06364208d5c89/node_modules/@google/design.md/dist/index.js:23969:26)