Skip to content

Commit dcede86

Browse files
djm81cursoragentDominikus Nold
authored
Release: Merge dev to main (v0.11.3) (#35)
* Build: Include resources in sdist and wheel builds Co-authored-by: dominikus.nold <[email protected]> * feat: Code2Spec Strategic Plan Phase 0 implementation (v0.6.9) (#26) * feat: Add JSON/YAML support for plan bundles (#27) * feat: add batch update support for plan review and updates (v0.7.0) - Add --batch-updates option to plan update-feature command - Add --batch-updates option to plan update-story command - Add --list-findings option to plan review command with structured output - Refactor review function to reduce complexity - Add comprehensive e2e tests for batch updates - Update documentation and prompts to prefer batch updates - Update version to 0.7.0 * fix: remove whitespace from blank lines and apply formatting * docs: align all documentation with CLI-first, integration-focused positioning - Updated all examples and guides with CLI-first messaging - Added Integration Showcases references throughout documentation - Emphasized integration diversity (VS Code, Cursor, GitHub Actions, pre-commit) - Updated brownfield showcase examples with integration workflow sections - Updated platform-frontend CMS to link to Integration Showcases README - Reviewed and aligned all brownfield documentation for CLI-first approach - Updated version to 0.7.1 Files updated: - All docs/examples/ files (6 files) - All docs/guides/ files (6 files) - docs/reference/directory-structure.md - platform-frontend/iac/scripts/payload-content-helper.js - Version files: pyproject.toml, setup.py, src/__init__.py, src/specfact_cli/__init__.py - CHANGELOG.md with comprehensive 0.7.1 entry * fix: resolve type checking errors in constitution_evidence_extractor - Fixed basedpyright warnings for repo_path.exists() in contract decorators - Added isinstance() type guard to properly narrow Path | None types - Updated Example 3 validation status to FULLY VALIDATED (CI/CD workflow verified in production) - Updated documentation to reflect Example 3 is validated in specfact-cli repository CI/CD Fixes type checking errors reported in GitHub Actions workflow: - constitution_evidence_extractor.py:65:53 - Type of "exists" is unknown - Fixed in all three methods: extract_article_vii_evidence, extract_article_viii_evidence, extract_article_ix_evidence Example 3 Status Update: - Changed from "COMMANDS VERIFIED" to "FULLY VALIDATED" - Validated in production CI/CD (specfact-cli PR #28) - Workflow successfully runs specfact repro and blocks PRs when validation fails * Fix typecheck error * Fix all type check errors * Fix type annotations * feat: Phase 4 complete - Contract generation and density scoring - Add contract density validator (contract_validator.py) with metrics calculation - Integrate contract density into enforce sdd and plan review commands - Add contract density metrics display in plan review output - Fix plan bundle hash persistence in plan harden command - Add integration test for plan bundle hash persistence - Update version to 0.8.0 - Update CHANGELOG.md with Phase 4 completion details - Update end-user documentation with new commands (plan harden, enforce sdd, generate contracts) Phase 4 Status: ✅ COMPLETE (2025-11-24) - 4.1 Contract Stub Generator: ✅ Complete - 4.2 Contract Density Scoring: ✅ Complete (10 unit tests passing) Test Coverage: - 10 unit tests for contract density validation - 1 integration test for hash persistence - All tests passing * feat: Complete Phase 4.1 Bridge Configuration Schema and Add Conflict Detection (#31) * feat: modular project bundle structure and bridge architecture (v0.9.0) - Implement modular project bundle structure (Phases 1-3) - Directory-based bundles with separated aspects - Bundle manifest with dual versioning and checksums - Lazy loading for features - Format detection and bundle loader/writer - Implement configurable bridge architecture (Phase 4 partial) - Bridge configuration models (adapter-agnostic) - Bridge detection and probe (auto-detect tool versions) - Bridge-based sync, templates, and watch mode - Spec-Kit is one adapter option among many - Update all commands to use --bundle parameter - All commands require explicit bundle name - SDD integration updated for modular bundles - 68 integration tests passing - Update documentation to reflect bridge architecture - Implementation plans updated with completion status - Architecture documentation for adapter-agnostic approach BREAKING CHANGE: All commands now require --bundle parameter. Modular format is the only supported format. * feat: complete Phase 4.1 bridge configuration schema and add conflict detection - Complete Phase 4.1: Bridge Configuration Schema - Add preset methods: preset_speckit_classic(), preset_speckit_modern(), preset_generic_markdown() - Add comprehensive tests for all preset methods (5 new tests) - All bridge configuration models complete with contract decorators - Add conflict detection enhancement - Warn when overwriting existing files during export_artifact() - Warn when updating bundles during import_artifact() - Add test_export_artifact_conflict_detection test - Improves safety of sync operations - Update documentation - Mark Phase 4.1 as completed (2025-11-26) - Mark conflict detection as completed - Document deferred items with acceptance criteria - Update test counts (84 unit tests passing) Test Results: - ✅ 84 unit tests passing (bridge components) - ✅ All contract tests passing - ✅ Type checking: 0 errors Phase 4 Status: ✅ COMPLETE (all 5 sub-phases done) * fix: update integration tests for new command signatures - Update generate contracts tests to use --plan with bundle directory - Update import tests to use 'from-bridge --adapter speckit' instead of 'from-spec-kit' - Update sync tests to use 'sync bridge --adapter speckit' instead of 'sync spec-kit' - Update test assertions for modular bundle structure (projects/ instead of plans/) - Fix SDD path references (sdd/<bundle-name>.yaml instead of sdd.yaml) Fixes CI failures in: - test_generate_contracts_creates_files - test_import_speckit_via_cli_command - test_bidirectional_sync_with_format_compatibility * Fix tests * apply format and lint * Fix tests * Fix all test failures * Fixed type checks * Update patch version * Update docs and fix some logic * Update prompt templates --------- Co-authored-by: Dominikus Nold <[email protected]> * Fix integration test * feat: update prompt templates with standardized parameter names - Update all prompt templates to use new standardized parameters: - --non-interactive → --no-interactive - --format → --output-format - Updated files: - specfact-plan-select.md (45 instances) - specfact-plan-promote.md (7 instances) - specfact-plan-review.md (4 instances) - specfact-plan-compare.md (16 instances + format updates) - All prompt templates now synchronized with CLI parameter standardization (Phase 1) Part of CLI Reorganization Phase 1 completion. * Update prompts and cli order * feat: CLI reorganization and Specmatic integration (v0.10.0) (#32) * feat: CLI reorganization and Specmatic integration (v0.10.0) - Add Specmatic integration with npx support - New 'spec' command group for API contract testing - Auto-detection of specmatic (direct or npx) - Integration with import, enforce, and sync commands - Comprehensive test coverage and documentation - Reorganize CLI commands - Move constitution commands to bridge group - Remove legacy constitution command (no deprecation period) - Reorder commands in logical workflow sequence - Remove hello command, show welcome message on no args - Fix test suite - Fix 4 failing e2e tests in test_init_command.py - Fix all linter issues (RUF005, RUF059) - All 1018 tests passing - Update version to 0.10.0 - Sync version across pyproject.toml, __init__.py, setup.py - Add comprehensive changelog entry * Update module version --------- Co-authored-by: Dominikus Nold <[email protected]> * feat: complete CLI reorganization (v0.10.1) - Phase 1: Parameter standardization complete - Standardized all parameter names (--repo, --out, --output-format, --no-interactive, --bundle) - Created parameter standard document - Added deprecation warnings for old parameter names - Phase 2: Parameter grouping complete - All commands organized with logical parameter groups - Help text updated with parameter group documentation - Improved discoverability and organization - Phase 3: Slash command reorganization complete - Reduced from 13 to 8 commands with numbered workflow ordering - New commands: specfact.01-import through specfact.06-sync - Shared CLI enforcement rules created - All templates follow consistent structure - Phase 4: Documentation updates complete - All command reference documentation updated - All user guides updated with new parameter structure - Migration guide expanded with comprehensive changes - All examples use consistent --bundle parameter format BREAKING CHANGE: All commands now require --bundle parameter (no default). Old parameter names deprecated (3-month transition period). Slash commands reorganized (old commands deprecated). Version: 0.10.1 * feat: migration tool test coverage and enhanced analysis features (#33) * chore: bump version to 0.10.2 and add changelog - Added SDD Feature Parity Implementation (Phases 1.5, 5.1, 5.2, 5.3) - Multi-SDD infrastructure with discovery utility - Task generation from plan bundles and SDD manifests - Code implementation command for executing tasks - Idea-to-ship orchestrator for end-to-end workflow - Fixed enum serialization bug in task generation - Fixed bundle name validation in orchestrator - Comprehensive test coverage (26 new tests) * chore: bump version to 0.11.0 - Fixed test timeout in test_init_handles_missing_templates - Enhanced error handling in get_package_installation_locations() - Added skip logic for problematic directories (typeshed stubs) - Improved test mocking for both utils and commands modules - Updated version consistently across pyproject.toml, setup.py, and __init__.py files * feat: add --include-tests flag for configurable test file filtering in relationship mapping - Add --include-tests flag to import from-code command - Test files filtered by default for ~30-50% speed improvement - Rationale: Test files are consumers of production code (one-way dependency) - Configurable via flag for comprehensive analysis when needed - Update CHANGELOG.md for version 0.11.1 - Update internal documentation with test file filtering optimization * fix: resolve max_workers validation, prompt validation, and type checking errors - Fix ThreadPoolExecutor max_workers must be > 0 in 5 locations - graph_analyzer.py: build_dependency_graph() - import_cmd.py: contract loading, hash updates, contract extraction - code_analyzer.py: file analysis parallelization - Fix prompt validation test path resolution (4 parent levels) - Fix prompt glob pattern (specfact-*.md -> specfact.*.md) - Fix 53 basedpyright errors for missing Feature parameters - Update version to 0.11.2 and sync across all version files All 9 previously failing tests now passing. * Add codeowners --------- Co-authored-by: Dominikus Nold <[email protected]> * feat: enhance target user extraction and remove GWT format references (v0.11.3) (#34) * feat: enhance target user extraction and remove GWT format references - Refactor target user extraction to prioritize pyproject.toml and README.md over codebase scanning - Simplify excluded terms list (reduced from 60+ to 14 terms) - Remove GWT format references from ambiguity scanner questions - Update question text to clarify acceptance criteria vs OpenAPI contracts - Fix false positives in user persona extraction (e.g., 'Detecting', 'Data Pipelines') - Improve README.md extraction to skip use cases, only extract personas Version bump: 0.11.2 → 0.11.3 * fix: remove invalid forced include for resources/semgrep - Removed forced include for resources/semgrep (directory doesn't exist at root) - Semgrep files are in src/specfact_cli/resources/semgrep/ and are automatically included - Fixes build error: FileNotFoundError: Forced include not found --------- Co-authored-by: Dominikus Nold <[email protected]> --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Dominikus Nold <[email protected]> Co-authored-by: Dominikus Nold <[email protected]>
1 parent a9167a1 commit dcede86

File tree

215 files changed

+33501
-10120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+33501
-10120
lines changed
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# SpecFact Import Command
2+
3+
## User Input
4+
5+
```text
6+
$ARGUMENTS
7+
```
8+
9+
You **MUST** consider the user input before proceeding (if not empty).
10+
11+
## Purpose
12+
13+
Import an existing codebase into a SpecFact plan bundle. Analyzes code structure using AI-first semantic understanding or AST-based fallback to generate a plan bundle representing the current system.
14+
15+
**When to use:**
16+
17+
- Starting SpecFact on an existing project (brownfield)
18+
- Converting legacy code to contract-driven format
19+
- Creating initial plan from codebase structure
20+
21+
**Quick Example:**
22+
23+
```bash
24+
/specfact.01-import --bundle legacy-api --repo .
25+
```
26+
27+
## Parameters
28+
29+
### Target/Input
30+
31+
- `--bundle NAME` (required argument) - Project bundle name (e.g., legacy-api, auth-module)
32+
- `--repo PATH` - Repository path. Default: current directory (.)
33+
- `--entry-point PATH` - Subdirectory for partial analysis. Default: None (analyze entire repo)
34+
- `--enrichment PATH` - Path to LLM enrichment report. Default: None
35+
36+
### Output/Results
37+
38+
- `--report PATH` - Analysis report path. Default: .specfact/reports/brownfield/analysis-<timestamp>.md
39+
40+
### Behavior/Options
41+
42+
- `--shadow-only` - Observe without enforcing. Default: False
43+
- `--enrich-for-speckit` - Auto-enrich for Spec-Kit compliance. Default: False
44+
45+
### Advanced/Configuration
46+
47+
- `--confidence FLOAT` - Minimum confidence score (0.0-1.0). Default: 0.5
48+
- `--key-format FORMAT` - Feature key format: 'classname' or 'sequential'. Default: classname
49+
50+
## Workflow
51+
52+
### Step 1: Parse Arguments
53+
54+
- Extract `--bundle` (required)
55+
- Extract `--repo` (default: current directory)
56+
- Extract optional parameters (confidence, enrichment, etc.)
57+
58+
### Step 2: Execute CLI
59+
60+
```bash
61+
specfact import from-code <bundle-name> --repo <path> [options]
62+
```
63+
64+
### Step 3: Present Results
65+
66+
- Display generated plan bundle location
67+
- Show analysis report path
68+
- Present summary of features/stories detected
69+
70+
## CLI Enforcement
71+
72+
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
73+
74+
**Rules:**
75+
76+
1. **ALWAYS execute CLI first**: Run `specfact import from-code` before any analysis
77+
2. **ALWAYS use non-interactive mode for CI/CD**: Use `--no-interactive` flag in Copilot environments
78+
3. **NEVER modify .specfact folder directly**: All operations must go through CLI
79+
4. **NEVER create YAML/JSON directly**: All artifacts must be CLI-generated
80+
5. **Use CLI output as grounding**: Parse CLI output, don't regenerate it
81+
82+
## Expected Output
83+
84+
## Success
85+
86+
```text
87+
✓ Project bundle created: .specfact/projects/legacy-api/
88+
✓ Analysis report: .specfact/reports/brownfield/analysis-2025-11-26T10-30-00.md
89+
✓ Features detected: 12
90+
✓ Stories detected: 45
91+
```
92+
93+
## Error (Missing Bundle)
94+
95+
```text
96+
✗ Project bundle name is required
97+
Usage: specfact import from-code <bundle-name> [options]
98+
```
99+
100+
## Common Patterns
101+
102+
```bash
103+
# Basic import
104+
/specfact.01-import --bundle legacy-api --repo .
105+
106+
# Import with confidence threshold
107+
/specfact.01-import --bundle legacy-api --repo . --confidence 0.7
108+
109+
# Import with enrichment report
110+
/specfact.01-import --bundle legacy-api --repo . --enrichment enrichment-report.md
111+
112+
# Partial analysis (subdirectory only)
113+
/specfact.01-import --bundle auth-module --repo . --entry-point src/auth/
114+
115+
# Spec-Kit compliance mode
116+
/specfact.01-import --bundle legacy-api --repo . --enrich-for-speckit
117+
```
118+
119+
## Context
120+
121+
{ARGS}
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# SpecFact Plan Management Command
2+
3+
## User Input
4+
5+
```text
6+
$ARGUMENTS
7+
```
8+
9+
You **MUST** consider the user input before proceeding (if not empty).
10+
11+
## Purpose
12+
13+
Manage project bundles: initialize new bundles, add features and stories, and update plan metadata. This unified command replaces multiple granular commands for better LLM workflow integration.
14+
15+
**When to use:**
16+
17+
- Creating a new project bundle (greenfield)
18+
- Adding features/stories to existing bundles
19+
- Updating plan metadata (idea, features, stories)
20+
21+
**Quick Example:**
22+
23+
```bash
24+
/specfact.02-plan init legacy-api
25+
/specfact.02-plan add-feature --bundle legacy-api --key FEATURE-001 --title "User Auth"
26+
```
27+
28+
## Parameters
29+
30+
### Target/Input
31+
32+
- `--bundle NAME` - Project bundle name (required for most operations)
33+
- `--key KEY` - Feature/story key (e.g., FEATURE-001, STORY-001)
34+
- `--feature KEY` - Parent feature key (for story operations)
35+
36+
### Output/Results
37+
38+
- (No output-specific parameters for plan management)
39+
40+
### Behavior/Options
41+
42+
- `--interactive/--no-interactive` - Interactive mode. Default: True (interactive)
43+
- `--scaffold/--no-scaffold` - Create directory structure. Default: True (scaffold enabled)
44+
45+
### Advanced/Configuration
46+
47+
- `--title TEXT` - Feature/story title
48+
- `--outcomes TEXT` - Expected outcomes (comma-separated)
49+
- `--acceptance TEXT` - Acceptance criteria (comma-separated)
50+
- `--constraints TEXT` - Constraints (comma-separated)
51+
- `--confidence FLOAT` - Confidence score (0.0-1.0)
52+
- `--draft/--no-draft` - Mark as draft
53+
54+
## Workflow
55+
56+
### Step 1: Parse Arguments
57+
58+
- Determine operation: `init`, `add-feature`, `add-story`, `update-idea`, `update-feature`, `update-story`
59+
- Extract required parameters (bundle name, keys, etc.)
60+
61+
### Step 2: Execute CLI
62+
63+
```bash
64+
# Initialize bundle
65+
specfact plan init <bundle-name> [--interactive/--no-interactive] [--scaffold/--no-scaffold]
66+
67+
# Add feature
68+
specfact plan add-feature --bundle <name> --key <key> --title <title> [--outcomes <outcomes>] [--acceptance <acceptance>]
69+
70+
# Add story
71+
specfact plan add-story --bundle <name> --feature <feature-key> --key <story-key> --title <title> [--acceptance <acceptance>]
72+
73+
# Update idea
74+
specfact plan update-idea --bundle <name> [--title <title>] [--narrative <narrative>] [--target-users <users>] [--value-hypothesis <hypothesis>] [--constraints <constraints>]
75+
76+
# Update feature
77+
specfact plan update-feature --bundle <name> --key <key> [--title <title>] [--outcomes <outcomes>] [--acceptance <acceptance>] [--constraints <constraints>] [--confidence <score>] [--draft/--no-draft]
78+
79+
# Update story
80+
specfact plan update-story --bundle <name> --feature <feature-key> --key <story-key> [--title <title>] [--acceptance <acceptance>] [--story-points <points>] [--value-points <points>] [--confidence <score>] [--draft/--no-draft]
81+
```
82+
83+
### Step 3: Present Results
84+
85+
- Display bundle location
86+
- Show created/updated features/stories
87+
- Present summary of changes
88+
89+
## CLI Enforcement
90+
91+
**CRITICAL**: Always use SpecFact CLI commands. See [CLI Enforcement Rules](./shared/cli-enforcement.md) for details.
92+
93+
**Rules:**
94+
95+
1. **ALWAYS execute CLI first**: Run appropriate `specfact plan` command before any analysis
96+
2. **ALWAYS use non-interactive mode for CI/CD**: Use `--no-interactive` flag in Copilot environments
97+
3. **NEVER modify .specfact folder directly**: All operations must go through CLI
98+
4. **NEVER create YAML/JSON directly**: All artifacts must be CLI-generated
99+
5. **Use CLI output as grounding**: Parse CLI output, don't regenerate it
100+
101+
## Expected Output
102+
103+
## Success (Init)
104+
105+
```text
106+
✓ Project bundle created: .specfact/projects/legacy-api/
107+
✓ Bundle initialized with scaffold structure
108+
```
109+
110+
## Success (Add Feature)
111+
112+
```text
113+
✓ Feature 'FEATURE-001' added successfully
114+
Feature: User Authentication
115+
Outcomes: Secure login, Session management
116+
```
117+
118+
## Error (Missing Bundle)
119+
120+
```text
121+
✗ Project bundle name is required
122+
Usage: specfact plan <operation> --bundle <name> [options]
123+
```
124+
125+
## Common Patterns
126+
127+
```bash
128+
# Initialize new bundle
129+
/specfact.02-plan init legacy-api
130+
/specfact.02-plan init auth-module --no-interactive
131+
132+
# Add feature with full metadata
133+
/specfact.02-plan add-feature --bundle legacy-api --key FEATURE-001 --title "User Auth" --outcomes "Secure login, Session management" --acceptance "Users can log in, Sessions persist"
134+
135+
# Add story to feature
136+
/specfact.02-plan add-story --bundle legacy-api --feature FEATURE-001 --key STORY-001 --title "Login API" --acceptance "API returns JWT token" --story-points 5
137+
138+
# Update feature metadata
139+
/specfact.02-plan update-feature --bundle legacy-api --key FEATURE-001 --title "Updated Title" --confidence 0.9
140+
141+
# Update idea section
142+
/specfact.02-plan update-idea --bundle legacy-api --target-users "Developers, DevOps" --value-hypothesis "Reduce technical debt"
143+
```
144+
145+
## Context
146+
147+
{ARGS}

0 commit comments

Comments
 (0)