-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Feat/extended artifacts llm generation #1396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
suportly
wants to merge
11
commits into
github:main
Choose a base branch
from
suportly:feat/extended-artifacts-llm-generation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat/extended artifacts llm generation #1396
suportly
wants to merge
11
commits into
github:main
from
suportly:feat/extended-artifacts-llm-generation
Conversation
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
This commit introduces the speckit-ai library, transforming spec-kit from a Markdown-template-based toolkit into a standalone Python library with universal LLM support via LiteLLM. Core Features: - SpecKit orchestrator class with full workflow methods - LiteLLM provider wrapper supporting 100+ LLM providers - Pydantic v2 models with to_markdown() serialization - Instructor integration for structured outputs - File-based artifact storage with backup support - Hierarchical configuration (env vars → YAML → code) Workflow Phases: - constitution: Project principles and constraints - specify: Generate feature specifications from descriptions - clarify: Identify ambiguities and generate questions - plan: Create technical implementation plans - tasks: Generate dependency-ordered task breakdowns - analyze: Cross-artifact consistency checking Interfaces: - Typer CLI with Rich formatting and progress indicators - MCP server for AI assistant integration (Claude Desktop) - Programmatic Python API for automation Package Structure: - src/speckit/ - Main package (22 modules) - src/speckit/core/ - Workflow phase implementations - src/speckit/storage/ - Artifact persistence layer - src/speckit/templates/ - Jinja2 prompt templates - src/speckit/mcp/ - MCP server integration - tests/ - Unit and contract tests (39 passing) - examples/ - Usage examples Implements feature 001-python-litellm-library (103/118 tasks complete). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
feat: implement speckit-ai Python library with LiteLLM integration
- Fix model_dump() to use mode='json' for datetime serialization in: - core/planner.py - core/tasker.py - core/analyzer.py - core/clarifier.py - Add integration tests (tests/integration/test_workflow.py): - TestSpecifyWorkflow: specify and save - TestPlanWorkflow: generate technical plans - TestTasksWorkflow: generate task breakdowns - TestFullWorkflow: end-to-end workflow - TestClarifyWorkflow: identify ambiguities - TestAnalyzeWorkflow: consistency checking All 7 integration tests pass with Claude Haiku API. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add PyPI badge to header badges - Add Python Library section to table of contents - Add comprehensive documentation for speckit-ai package: - Installation instructions (pip install speckit-ai) - Optional MCP support installation - Quick Start example with full workflow - CLI usage examples - List of supported LLM providers (100+ via LiteLLM) - Environment variable configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
BREAKING CHANGES: - Task.phase is now a string instead of PhaseType enum (for dynamic phases) - Task now includes priority, dependency_reasons, and phase_label fields - TaskBreakdown now includes Phase objects for proper phase organization Changes: - Task.to_markdown() now outputs multi-line format with: > Description: ... > Files: ... > Depends: T001 (reason) > Priority: P1 - Added Phase model for organizing tasks into named phases - TaskBreakdown.to_markdown() now outputs full template structure: - Header with input/prerequisites - Format documentation - Phases grouped with purpose and checkpoints - Dependencies & Execution Order section - Summary table with metrics - Updated tasks.jinja2 template to generate proper JSON structure - Updated test fixtures to use new schema - Bumped version to 0.2.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Fix bug in TaskBreakdown.to_markdown() that rendered tasks twice - Add _deduplicate_tasks() and _deduplicate_phases() in TaskGenerator - Add automatic duplicate detection in ConsistencyAnalyzer - Add integration test for full artifact generation workflow - Bump version to 0.2.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Bump version from 0.2.1 to 0.2.2 - Add template improvements for plan, specification, and tasks - Enhance core modules with additional functionality 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Test language propagation through templates (specification, plan, tasks) - Test language parameter handling in SpecificationBuilder, TechnicalPlanner, TaskGenerator - Test SpecKit language config propagation - Test edge cases (empty string, uppercase, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…ist, quickstart) Add support for 5 new artifact types that achieve feature parity with the bash/CLI version of spec-kit: New Artifacts: - DataModel (data-model.md): Database schema and entity definitions - ResearchFindings (research.md): Technology decisions and ADRs - APIContract (contracts/api.md): Formal API specifications - QualityChecklist (checklists/requirements.md): Spec quality validation - QuickstartGuide (quickstart.md): Getting started documentation Changes: - Added 10 new Pydantic models to schemas.py (+486 lines) - Added 5 new save methods to FileStorage class - Updated get_artifact_path() to support new artifact types - Exported all new models in __init__.py All models include: - Pydantic validation and typing - to_markdown() export method - Proper directory structure (contracts/, checklists/ subdirs) - Backup functionality on overwrite This is a purely additive change with full backward compatibility. No breaking changes to existing functionality. Resolves feature parity gap between Python library and bash/CLI versions. See EXTENDED_ARTIFACTS_IMPLEMENTATION.md for detailed documentation, usage examples, and migration guide.
feat: add extended artifacts (data-model, research, contracts, checkl…
This implements Phase 2 of the extended artifacts feature, adding automatic
LLM-powered generation for all 5 artifact types that were added in Phase 1.
## New Features
- **ArtifactGenerator Module** (src/speckit/core/artifacts.py)
- generate_data_model() - Generate database schemas from spec and plan
- generate_research() - Document technology decisions from plan
- generate_api_contract() - Create API specifications from spec and plan
- generate_checklist() - Validate specification quality
- generate_quickstart() - Create developer onboarding guides
- All methods include async versions
- **Jinja2 Prompt Templates** (5 new files)
- templates/data_model.jinja2 - Data model generation prompt
- templates/research.jinja2 - Research findings generation prompt
- templates/api_contract.jinja2 - API contract generation prompt
- templates/checklist.jinja2 - Quality checklist generation prompt
- templates/quickstart.jinja2 - Quickstart guide generation prompt
- **SpecKit Public API** (10 new methods)
- kit.generate_data_model(spec, plan) -> DataModel
- kit.generate_research(plan) -> ResearchFindings
- kit.generate_api_contract(spec, plan) -> APIContract
- kit.generate_checklist(spec) -> QualityChecklist
- kit.generate_quickstart(spec, plan) -> QuickstartGuide
- Plus async versions of all methods
## Benefits
- **Automation**: Generate comprehensive artifacts automatically using AI
- **Consistency**: Follow established patterns from existing workflow methods
- **Language Support**: All methods support multi-language output (pt-br, es, en)
- **Async Support**: Full async/await support for parallel generation
- **Developer Experience**: Simple, intuitive API matching core workflow
## Usage Example
```python
from speckit import SpecKit
kit = SpecKit("./my-project")
# Core workflow
spec = kit.specify("Add user authentication")
plan = kit.plan(spec)
# Extended artifacts (automatic generation!)
data_model = kit.generate_data_model(spec, plan)
research = kit.generate_research(plan)
contract = kit.generate_api_contract(spec, plan)
checklist = kit.generate_checklist(spec)
quickstart = kit.generate_quickstart(spec, plan)
# Save all artifacts
kit.storage.save_data_model(data_model, spec.feature_id)
kit.storage.save_research(research, spec.feature_id)
kit.storage.save_api_contract(contract, spec.feature_id)
kit.storage.save_checklist(checklist, spec.feature_id)
kit.storage.save_quickstart(quickstart, spec.feature_id)
```
## Files Changed
- src/speckit/core/artifacts.py (+340 lines) - NEW
- src/speckit/speckit.py (+245 lines) - Updated
- src/speckit/templates/data_model.jinja2 (+70 lines) - NEW
- src/speckit/templates/research.jinja2 (+66 lines) - NEW
- src/speckit/templates/api_contract.jinja2 (+86 lines) - NEW
- src/speckit/templates/checklist.jinja2 (+94 lines) - NEW
- src/speckit/templates/quickstart.jinja2 (+102 lines) - NEW
- PHASE_2_LLM_GENERATION.md (+324 lines) - NEW documentation
- test_extended_artifacts_generation.py (+80 lines) - NEW test
## Breaking Changes
None. Fully backward compatible.
## Related
- Phase 1: PR #4 (Extended Artifacts Models)
- Next: Phase 3 (Velospec Platform Integration)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
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.
No description provided.