Skip to content

Conversation

@Ray0907
Copy link

@Ray0907 Ray0907 commented Nov 2, 2025

Adds 'specify summarize' to analyze existing projects and generate
technology stack summaries, making it easier to onboard to unfamiliar
codebases or document project architecture.

  Adds 'specify summarize' to analyze existing projects and generate
  technology stack summaries, making it easier to onboard to unfamiliar
  codebases or document project architecture.
@Ray0907 Ray0907 requested a review from localden as a code owner November 2, 2025 04:43
Copilot AI review requested due to automatic review settings November 2, 2025 04:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 summarize CLI 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.

Copilot AI review requested due to automatic review settings November 2, 2025 04:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_names by replacing '.ps1' with '.sh', but this will only work when Windows is the platform (when script_name ends with '.ps1'). On Unix systems, script_name already 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_type variable 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 somehow script_type remains 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.

Copilot AI review requested due to automatic review settings November 2, 2025 05:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI review requested due to automatic review settings November 2, 2025 05:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI review requested due to automatic review settings November 2, 2025 05:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@johnml1135
Copy link

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:

  • Not optimize and look at every file in a folder or project
  • Perform multiple passes over each folder or project so as to capture nuance
  • Scaffold the AI description of each project in a AI understandable format
  • Develop a plan for keeping the summaries up to date automatically
  • Keep poking the coding agent to work through the 62 major projects in the repository. It would do 10, and then quit as it said it would continue.

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.

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.

2 participants