feat: add openspec generate command#1
Merged
fernandomenuk merged 1 commit intomasterfrom Mar 13, 2026
Merged
Conversation
Adds a new `generate` command that performs deep codebase analysis — scanning package.json, config files, directory structure, and actual source code patterns — then outputs a structured context document. AI agents (Claude Code, Cursor, etc.) read this output and use it to write rich, project-specific module files. Scanner architecture: - 10 parallel detectors (language, framework, build-tool, testing, linting, styling, structure, package-manager, database, cicd) - Source file sampler that reads representative files and detects code patterns - Formatter with markdown (default) and JSON output modes Includes 38 new tests (68 total) covering detectors, sampler, formatter, and integration scenarios. README updated with docs and examples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openspec generatecommand that performs deep codebase analysis (language, framework, build tools, testing, linting, styling, databases, CI/CD, package manager, project structure)Test plan
npm run buildcompiles successfullynpm test— all 68 tests passopenspec generateoutputs correct analysis for this repoopenspec generate --jsonoutputs valid JSON🤖 Generated with Claude Code