feat: add summarize command for brownfield(existed) project analysis#1102
feat: add summarize command for brownfield(existed) project analysis#1102Ray0907 wants to merge 11 commits intogithub:mainfrom
Conversation
Adds 'specify summarize' to analyze existing projects and generate technology stack summaries, making it easier to onboard to unfamiliar codebases or document project architecture.
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new summarize command to analyze existing codebases and generate comprehensive project summaries. The feature helps bootstrap spec-kit usage in brownfield/existing projects by automatically discovering technology stack, architecture patterns, and code conventions.
- Added
specify summarizeCLI command for project analysis - Created bash script to detect languages, frameworks, and directory structures
- Added template files for project summary generation and AI assistant guidance
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Implements summarize CLI command with script detection, execution, and summary generation |
scripts/bash/generate-project-summary.sh |
Bash script to detect project type, languages, config files, and directory structure |
templates/commands/summarize.md |
AI assistant template with detailed instructions for comprehensive project analysis |
templates/project-summary-template.md |
Standalone template showing expected project summary structure |
README.md |
Documentation updates for the new summarize command and /speckit.summarize slash command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
src/specify_cli/init.py:1
- The fallback logic creates
possible_script_namesby replacing '.ps1' with '.sh', but this will only work when Windows is the platform (when script_name ends with '.ps1'). On Unix systems,script_namealready ends with '.sh', so the replace operation does nothing, creating duplicate entries. Consider a more explicit approach:possible_script_names = ['generate-project-summary.sh', 'generate-project-summary.ps1']to ensure both scripts are checked on all platforms.
#!/usr/bin/env python3
src/specify_cli/init.py:1
- The
script_typevariable is set in the script search loop (lines 1222-1225), but if no script is found, the code exits at line 1234 before reaching this point. However, if somehowscript_typeremains None after finding a script (e.g., if the file has an unexpected extension), this will raise an unclear error. The 'else' branch at line 1244 is unreachable given the current logic since script_type is always set when a script is found.
#!/usr/bin/env python3
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Has this been tested on anything substantial, such as +1M lines of code? In trying to manually spin summaries (sillsdev/FieldWorks#500) I found I had to do a fair amount to have copilot:
Feel free to look at the pull request above for inspiration. It is 2 million lines of c# and xml. I just have it drafted today I have not verified how well it works. |
Adds 'specify summarize' to analyze existing projects and generate
technology stack summaries, making it easier to onboard to unfamiliar
codebases or document project architecture.