Skip to content

Commit 29f9505

Browse files
djm81cursoragentDominikus Nold
authored
feat: Batch update support for plan review and updates (v0.7.0) (#28)
* 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 --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Dominikus Nold <[email protected]>
1 parent 0d96bf5 commit 29f9505

File tree

168 files changed

+14591
-12195
lines changed

Some content is hidden

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

168 files changed

+14591
-12195
lines changed

.cursor/rules/session_startup_instructions.mdc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,25 @@ alwaysApply: true
2121
1.2. `CLAUDE.md`: Check for any session-specific goals or instructions (applies to Claude CLI only).
2222
2. `docs/README.md` to get the latest project status and priorities and see which plan is referenced as being worked on: Understand the current development phase and tasks based on the mentioned plan in the README.md file.
2323
3. Outline your understanding of the current development phase and tasks based on the mentioned plan in the README.md file, before proceeding with any work. Ask the user for confirmation before proceeding.
24+
25+
## Documentation and Planning Guidelines
26+
27+
**CRITICAL**: When working with planning and documentation:
28+
29+
- **Work directly with major artifacts**: Update strategic plans, implementation plans, and analysis documents directly. Do NOT create plans for plans, tracking documents for tracking documents, or status artifacts for status artifacts.
30+
- **Update existing artifacts**: Add status annotations (✅ Complete, ⏳ In Progress, 🟡 Pending) directly to existing plan documents rather than creating separate status files.
31+
- **Consolidate, don't multiply**: Only create new documentation artifacts when they add clear, unique value that cannot be captured in existing artifacts.
32+
- **Performance metrics**: Record timing and performance data directly in implementation status documents, not in separate performance tracking files.
33+
- **Test results**: Include test results and validation outcomes in the relevant implementation status or quality analysis documents.
34+
35+
**Examples of what NOT to do**:
36+
37+
- ❌ Creating `PHASE0_TRACKING.md` when `CODE2SPEC_STRATEGIC_PLAN.md` already exists
38+
- ❌ Creating `STEP1_1_TEST_RESULTS.md` when `PHASE1_IMPLEMENTATION_STATUS.md` can be updated
39+
- ❌ Creating `PERFORMANCE_METRICS.md` when performance data can go in implementation status
40+
41+
**Examples of what TO do**:
42+
43+
- ✅ Update `CODE2SPEC_STRATEGIC_PLAN.md` with status annotations (✅ Complete, ⏳ Next)
44+
- ✅ Add test results and performance metrics to `PHASE1_IMPLEMENTATION_STATUS.md`
45+
- ✅ Update `QUALITY_GAP_ANALYSIS.md` with measurement results and progress

.cursor/rules/spec-fact-cli-rules.mdc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ hatch test --cover -v tests/unit/common/test_logger_setup.py
111111

112112
1. **Analyze Impact**: Understand system-wide effects before changes
113113
2. **Run Tests**: `hatch run smart-test` (≥80% coverage required)
114-
3. **Update Documentation**: Keep docs/ current with changes
115-
4. **Version Control**: Update CHANGELOG.md, sync versions in pyproject.toml/setup.py
114+
3. **Update Documentation**: Keep docs/ current with changes. **IMPORTANT** DO NOT create internal docs that should not be visible to end users in the specfact-cli repo folder. Instead use the respective internal repository for such documentation.
115+
4. **Version Control**: Update CHANGELOG.md
116+
5. Sync versions in across `pyproject.toml`, `setup.py`, `src/__init__.py`, `src/specfact_cli/__init__py`
116117

117118
### **Strict Testing Requirements (NO EXCEPTIONS)**
118119

.cursorrules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- **Contract-first**: All public APIs must have `@icontract` decorators and `@beartype` type checking
2323
- **CLI focus**: Commands should follow typer patterns with rich console output
2424
- **Data validation**: Use Pydantic models for all data structures
25+
- **Documentation and Planning**: Work directly with major artifacts (strategic plans, implementation plans, etc.). Do NOT create plans for plans, tracking documents for tracking documents, or status artifacts for status artifacts. Only create new documentation artifacts when they add clear value and are not redundant with existing artifacts. Update existing artifacts with status annotations rather than creating separate status files.
2526
- Always finish each output listing which rulesets have been applied in your implementation and which AI (LLM) provider and model (including the version) you are using in your actual request for clarity. Ensure the model version is accurate and reflects what is currently running.
2627

2728
<available_instructions>

.github/workflows/cleanup-branches.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Cleanup Merged Branches
44

55
on:
66
schedule:
7-
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
8-
workflow_dispatch: # Allow manual trigger
7+
- cron: "0 0 * * 0" # Weekly on Sunday at midnight UTC
8+
workflow_dispatch: # Allow manual trigger
99

1010
jobs:
1111
cleanup:
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
# Get list of merged feature branches (excluding main)
2929
MERGED_BRANCHES=$(git branch -r --merged origin/main | grep 'origin/feature/' | sed 's|origin/||' | tr -d ' ')
30-
30+
3131
if [ -z "$MERGED_BRANCHES" ]; then
3232
echo "No merged feature branches to delete."
3333
else
@@ -44,4 +44,3 @@ jobs:
4444
run: |
4545
echo "✅ Cleanup complete"
4646
echo "Merged feature branches have been deleted from remote."
47-

.github/workflows/github-pages.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'docs/**'
9-
- '.github/workflows/github-pages.yml'
10-
- '_config.yml'
11-
- 'docs/Gemfile'
12-
- 'docs/index.md'
13-
- 'docs/assets/**'
14-
- 'LICENSE.md'
15-
- 'TRADEMARKS.md'
8+
- "docs/**"
9+
- ".github/workflows/github-pages.yml"
10+
- "_config.yml"
11+
- "docs/Gemfile"
12+
- "docs/index.md"
13+
- "docs/assets/**"
14+
- "LICENSE.md"
15+
- "TRADEMARKS.md"
1616
workflow_dispatch:
1717
inputs:
1818
branch:
19-
description: 'Branch to deploy (defaults to main)'
19+
description: "Branch to deploy (defaults to main)"
2020
required: false
21-
default: 'main'
21+
default: "main"
2222

2323
permissions:
2424
contents: read
@@ -43,7 +43,7 @@ jobs:
4343
- name: Setup Ruby (for Jekyll)
4444
uses: ruby/setup-ruby@v1
4545
with:
46-
ruby-version: '3.2'
46+
ruby-version: "3.2"
4747
bundler-cache: false
4848
working-directory: ./docs
4949

@@ -88,4 +88,3 @@ jobs:
8888
- name: Deploy to GitHub Pages
8989
id: deployment
9090
uses: actions/deploy-pages@v4
91-

.github/workflows/pr-orchestrator.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ jobs:
219219
- name: Run type checking
220220
run: |
221221
echo "🔍 Running basedpyright type checking..."
222-
hatch run type-check || echo "⚠️ Type checking incomplete"
222+
# Fail on type errors (severity 8) to enforce type safety in CI/CD
223+
hatch run type-check
223224
224225
linting:
225226
name: Linting (ruff, pylint)
@@ -329,7 +330,7 @@ jobs:
329330
run: |
330331
PUBLISHED="${{ steps.publish.outputs.published }}"
331332
VERSION="${{ steps.publish.outputs.version }}"
332-
333+
333334
{
334335
echo "## PyPI Publication Summary"
335336
echo "| Parameter | Value |"
@@ -343,4 +344,3 @@ jobs:
343344
echo "| Status | ⏭️ Skipped (version not newer) |"
344345
fi
345346
} >> "$GITHUB_STEP_SUMMARY"
346-

.github/workflows/pre-merge-check.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
# Patterns match .gitignore: /test_*.py, /debug_*.py, /trigger_*.py, /temp_*.py
2828
# These are files at the root level, not in subdirectories
2929
CHANGED_FILES=$(git diff origin/main...HEAD --name-only)
30-
30+
3131
# Check for temporary Python files at root (not in tests/ or any subdirectory)
3232
TEMP_FILES=$(echo "$CHANGED_FILES" | grep -E "^(temp_|debug_|trigger_|test_).*\.py$" | grep -v "^tests/" | grep -v "/" || true)
33-
33+
3434
# Also check for analysis artifacts at root
3535
ARTIFACT_FILES=$(echo "$CHANGED_FILES" | grep -E "^(functional_coverage|migration_analysis|messaging_migration_plan)\.json$" | grep -v "/" || true)
36-
36+
3737
if [ -n "$TEMP_FILES" ] || [ -n "$ARTIFACT_FILES" ]; then
3838
echo "❌ Temporary files detected in PR:"
3939
[ -n "$TEMP_FILES" ] && echo "$TEMP_FILES"
@@ -50,7 +50,7 @@ jobs:
5050
run: |
5151
# Check for WIP commits in PR
5252
WIP_COMMITS=$(git log origin/main..HEAD --oneline | grep -i "wip\|todo\|fixme\|xxx" || true)
53-
53+
5454
if [ -n "$WIP_COMMITS" ]; then
5555
echo "⚠️ WIP commits detected (may be intentional):"
5656
echo "$WIP_COMMITS"
@@ -64,12 +64,11 @@ jobs:
6464
run: |
6565
# Check for files larger than 1MB
6666
LARGE_FILES=$(git diff origin/main...HEAD --name-only | xargs -I {} find {} -size +1M 2>/dev/null || true)
67-
67+
6868
if [ -n "$LARGE_FILES" ]; then
6969
echo "⚠️ Large files detected:"
7070
echo "$LARGE_FILES"
7171
echo "::warning::Large files detected. Consider using Git LFS."
7272
else
7373
echo "✅ No large files detected"
7474
fi
75-

.github/workflows/specfact.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,3 @@ jobs:
138138
run: |
139139
echo "❌ Validation failed. Exiting with error code."
140140
exit 1
141-

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,5 @@ reports/
116116
.cursor/mcp.json
117117

118118
# Jekyll bundle
119-
vendor/
119+
vendor/
120+
_site/

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
- **Contract-first workflow**: Before pushing, run `hatch run format`, `hatch run lint`, and `hatch run contract-test`
8181
- PRs should link to CLI-First Strategy docs, describe contract impacts, and include tests
8282
- Attach contract validation notes and screenshots/logs when behavior changes
83-
- **Version Updates**: When updating the version in `pyproject.toml`, ensure it's newer than the latest PyPI version. The CI/CD pipeline will automatically publish to PyPI after successful merge to `main` only if the version is newer.
83+
- **Version Updates**: When updating the version in `pyproject.toml`, ensure it's newer than the latest PyPI version. The CI/CD pipeline will automatically publish to PyPI after successful merge to `main` only if the version is newer. Sync versions across `pyproject.toml`, `setup.py`, `src/__init__.py`, `src/specfact_cli/__init__py`
8484

8585
## CLI Command Development Notes
8686

@@ -206,7 +206,7 @@ console.print("[bold red]✗[/bold red] Validation failed")
206206
- Package name: `specfact-cli`
207207
- CLI command: `specfact`
208208
- PyPI distribution: `pip install specfact-cli`
209-
- uvx usage: `uvx --from specfact-cli specfact <command>`
209+
- uvx usage: `uvx specfact-cli@latest <command>` (recommended) or `uvx --from specfact-cli specfact <command>`
210210
- Container: `docker run ghcr.io/nold-ai/specfact-cli:latest`
211211

212212
## Success Criteria

0 commit comments

Comments
 (0)